Commit 6f79c7e
committed
Remove support for Mockito annotations and
This change remove the support for Mockito annotations, `MockitoSession`
and opening/closing of mocks that was inherited from Boot's `@MockBean`
support, as well as the switch to `MockitoSession` made in 1c893e6.
Attempting to take responsability for things Mockito's own JUnit
Jupiter extension does better is not ideal, and we found it leads to
several corner cases which make `SpringExtension` and `MockitoExtension`
incompatible in the current approach.
Instead, this change refocuses our Mockito bean overriding support
exclusively on aspects specific to the Framework. `MockitoExtension`
will thus be usable in conjunction with `SpringExtension` if one needs
to use `@Captor`/`@InitMocks`/`@Mock`/`@Spy` or other Mockito utilities.
See gh-33318
Closes gh-33692MockitoSession
1 parent c261ca3 commit 6f79c7e
File tree
14 files changed
+5
-432
lines changed- framework-docs/modules/ROOT/pages/testing
- annotations/integration-spring
- testcontext-framework
- spring-test/src
- main
- java/org/springframework/test/context
- bean/override/mockito
- resources/META-INF
- test/java/org/springframework/test/context
- bean/override/mockito
14 files changed
+5
-432
lines changedLines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | 30 | | |
34 | 31 | | |
35 | 32 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
71 | 69 | | |
72 | 70 | | |
73 | 71 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
| |||
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | 45 | | |
48 | 46 | | |
49 | | - | |
50 | | - | |
| 47 | + | |
51 | 48 | | |
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
55 | 52 | | |
56 | | - | |
57 | | - | |
| 53 | + | |
| 54 | + | |
58 | 55 | | |
59 | 56 | | |
60 | 57 | | |
| |||
Lines changed: 0 additions & 47 deletions
This file was deleted.
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| |||
Lines changed: 0 additions & 102 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
Lines changed: 0 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
69 | 68 | | |
70 | 69 | | |
71 | 70 | | |
72 | | - | |
73 | 71 | | |
74 | 72 | | |
75 | 73 | | |
| |||
92 | 90 | | |
93 | 91 | | |
94 | 92 | | |
95 | | - | |
96 | 93 | | |
97 | 94 | | |
98 | 95 | | |
| |||
114 | 111 | | |
115 | 112 | | |
116 | 113 | | |
117 | | - | |
118 | 114 | | |
119 | 115 | | |
120 | 116 | | |
| |||
137 | 133 | | |
138 | 134 | | |
139 | 135 | | |
140 | | - | |
141 | 136 | | |
142 | 137 | | |
143 | 138 | | |
| |||
0 commit comments