File tree Expand file tree Collapse file tree
src/test/java/io/weaviate/client6/v1/api/collections/batch Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,11 +138,14 @@ public void reset() throws Exception {
138138 // This resets the interrupted flag, allowing use to await the executors.
139139 Thread .interrupted ();
140140
141+ boolean terminated ;
141142 backgroundThread .shutdownNow ();
142- backgroundThread .awaitTermination (10 , TimeUnit .SECONDS );
143+ terminated = backgroundThread .awaitTermination (10 , TimeUnit .SECONDS );
144+ assert terminated : "backgroundThread not terminated" ;
143145
144146 eventThread .shutdownNow ();
145- eventThread .awaitTermination (10 , TimeUnit .SECONDS );
147+ terminated = eventThread .awaitTermination (10 , TimeUnit .SECONDS );
148+ assert terminated : "eventThread not terminated" ;
146149
147150 REQUEST_QUEUE .clear ();
148151
@@ -185,7 +188,7 @@ public void test_sendOneBatch() throws Exception {
185188 Assertions .assertThat (tasks )
186189 .extracting (TaskHandle ::isAcked ).allMatch (CompletableFuture ::isDone );
187190
188- out .emitEvent (new Event .Results (received , Collections .emptyMap ())). get ( );
191+ out .stream . onNext (new Event .Results (received , Collections .emptyMap ()));
189192
190193 // Since MockServer runs in the same thread as this test,
191194 // the context will be updated before the last emitEvent returns.
You can’t perform that action at this time.
0 commit comments