Skip to content

Commit 689e8de

Browse files
committed
Tweaks for Mockito on Java 21
1 parent c9d0ed5 commit 689e8de

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,9 @@
399399
<excludes>
400400
<exclude>**/*TestSuite.java</exclude>
401401
</excludes>
402+
<argLine>-XX:+EnableDynamicAgentLoading</argLine>
402403
<systemPropertyVariables>
404+
<net.bytebuddy.experimental>true</net.bytebuddy.experimental>
403405
<rabbitmqctl.bin>DOCKER:rabbitmq</rabbitmqctl.bin>
404406
</systemPropertyVariables>
405407
</configuration>

src/test/java/com/rabbitmq/stream/impl/ConsumersCoordinatorTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,10 @@ public Client.ClientParameters shutdownListener(
164164

165165
@AfterEach
166166
void tearDown() throws Exception {
167-
// just taking the opportunity to check toString() generates valid JSON
168-
MonitoringTestUtils.extract(coordinator);
167+
if (coordinator != null) {
168+
// just taking the opportunity to check toString() generates valid JSON
169+
MonitoringTestUtils.extract(coordinator);
170+
}
169171
if (scheduledExecutorService != null) {
170172
scheduledExecutorService.shutdownNow();
171173
}

0 commit comments

Comments
 (0)