Skip to content

Commit e01c8b9

Browse files
committed
DATACASS-581 - Fix test conditions in DefaultBridgedReactiveSessionUnitTests.
Report completed future to adapt to Guava's future state checking in newer library versions.
1 parent fbcf50e commit e01c8b9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/cql/DefaultBridgedReactiveSessionUnitTests.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
*
5353
* @author Mark Paluch
5454
*/
55-
@RunWith(MockitoJUnitRunner.class)
55+
@RunWith(MockitoJUnitRunner.Silent.class)
5656
public class DefaultBridgedReactiveSessionUnitTests {
5757

5858
@Mock Session sessionMock;
@@ -77,6 +77,8 @@ public void before() {
7777

7878
return null;
7979
}).when(future).addListener(any(), any());
80+
81+
when(future.isDone()).thenReturn(true);
8082
}
8183

8284
@Test // DATACASS-335
@@ -248,6 +250,7 @@ public void shouldFetchDependingOnCompletion() throws Exception {
248250
return null;
249251
}).when(future).addListener(any(), any());
250252

253+
when(future.isDone()).thenReturn(true);
251254
when(future.get()).thenReturn(resultSet);
252255
when(resultSet.isFullyFetched()).thenReturn(false, false, true);
253256
when(resultSet.fetchMoreResults()).thenReturn(future);

0 commit comments

Comments
 (0)