Commit eae3840
fix: Mockito inline mocking for Java 21+ (#207)
Before this fix the execution of the maven surefire
plugin with Java 21 logged warnings that mockito should be added as
a java agent, because the self-attaching won't be supported in future
java releases.
In Java 24 the test just broke.
This problem is solved by modifying the pom.xml of the parent and doing
this changes:
* Adding mockito as a java agent.
* Removing the surefireArgLine from the properties. This can be
added back when it's needed (for example when JaCoCo will be used).
Furthermore, the pom.xml in the mcp-spring-* modules now have
the byte-buddy dependency included, as the test would otherwise break
when trying to mock McpSchema#CreateMessageRequest.
Fixes #187
Co-authored-by: Dariusz Jędrzejczyk <[email protected]>1 parent e34babb commit eae3840
3 files changed
+25
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
85 | 91 | | |
86 | 92 | | |
87 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
166 | 178 | | |
167 | 179 | | |
168 | 180 | | |
169 | 181 | | |
170 | 182 | | |
171 | | - | |
172 | | - | |
| 183 | + | |
173 | 184 | | |
174 | 185 | | |
175 | 186 | | |
| |||
0 commit comments