@@ -108,11 +108,12 @@ public void shouldProvideConsistentAnswerToTopicLookupsUsingAdminApi()
108
108
List <String > topicNames = IntStream .range (0 , 500 ).mapToObj (i -> topicNameBase + i )
109
109
.collect (Collectors .toList ());
110
110
List <PulsarAdmin > allAdmins = getAllAdmins ();
111
- @ Cleanup ("shutdown " )
111
+ @ Cleanup ("shutdownNow " )
112
112
ExecutorService executorService = Executors .newFixedThreadPool (allAdmins .size ());
113
113
List <Future <List <String >>> resultFutures = new ArrayList <>();
114
114
// use Phaser to increase the chances of a race condition by triggering all threads once
115
115
// they are waiting just before each lookupTopic call
116
+ @ Cleanup ("forceTermination" )
116
117
final Phaser phaser = new Phaser (1 );
117
118
for (PulsarAdmin brokerAdmin : allAdmins ) {
118
119
phaser .register ();
@@ -149,11 +150,12 @@ public void shouldProvideConsistentAnswerToTopicLookupsUsingClient()
149
150
List <String > topicNames = IntStream .range (0 , 500 ).mapToObj (i -> topicNameBase + i )
150
151
.collect (Collectors .toList ());
151
152
List <PulsarClient > allClients = getAllClients ();
152
- @ Cleanup ("shutdown " )
153
+ @ Cleanup ("shutdownNow " )
153
154
ExecutorService executorService = Executors .newFixedThreadPool (allClients .size ());
154
155
List <Future <List <String >>> resultFutures = new ArrayList <>();
155
156
// use Phaser to increase the chances of a race condition by triggering all threads once
156
157
// they are waiting just before each lookupTopic call
158
+ @ Cleanup ("forceTermination" )
157
159
final Phaser phaser = new Phaser (1 );
158
160
for (PulsarClient brokerClient : allClients ) {
159
161
phaser .register ();
0 commit comments