@@ -128,6 +128,7 @@ public void testImportPartitionKeyOnly() {
128
128
// then
129
129
assertEquals (ExitStatus .STATUS_OK , status );
130
130
Mockito .verify (sender , Mockito .times (2 )).sendMutationAsync (abstractMutationCaptor .capture ());
131
+ Mockito .verify (sender , Mockito .times (1 )).close ();
131
132
List <AbstractMutation <TableMetadata >> pkValues = abstractMutationCaptor .getAllValues ();
132
133
assertEquals (2 , pkValues .size ());
133
134
List <Object > allPkValues = pkValues .stream ().flatMap (v -> Arrays .stream (v .getPkValues ())).collect (Collectors .toList ());
@@ -203,6 +204,7 @@ public void testImportPartitionAndClusteringKeys() {
203
204
// then
204
205
assertEquals (ExitStatus .STATUS_OK , status );
205
206
Mockito .verify (sender , Mockito .times (2 )).sendMutationAsync (abstractMutationCaptor .capture ());
207
+ Mockito .verify (sender , Mockito .times (1 )).close ();
206
208
List <AbstractMutation <TableMetadata >> pkValues = abstractMutationCaptor .getAllValues ();
207
209
assertEquals (2 , pkValues .size ());
208
210
List <Object >[] allPkValues = pkValues .stream ().map (v -> v .getPkValues ()).map (Arrays ::asList ).toArray (List []::new );
@@ -285,6 +287,7 @@ public void testImportInflightMessagesBound() throws URISyntaxException, IOExcep
285
287
// verify that no more interactions with sender because no new records should've been sent.
286
288
assertTrue (importFuture .isDone ());
287
289
assertThat (importFuture .get (), is (ExitStatus .STATUS_OK ));
290
+ Mockito .verify (sender , Mockito .times (1 )).close ();
288
291
Mockito .verifyNoMoreInteractions (sender );
289
292
}
290
293
@@ -330,6 +333,7 @@ public void testImportFailsFast() throws URISyntaxException, IOException, Execut
330
333
331
334
// then
332
335
assertTrue (importFuture .isDone ());
336
+ Mockito .verify (sender , Mockito .times (1 )).close ();
333
337
assertThat (importFuture .get (), is (ExitStatus .STATUS_ABORTED_FATAL_ERROR ));
334
338
}
335
339
0 commit comments