|
43 | 43 | import org.springframework.scheduling.annotation.AsyncResult; |
44 | 44 | import org.springframework.util.concurrent.ListenableFuture; |
45 | 45 |
|
46 | | -import com.datastax.driver.core.BoundStatement; |
47 | | -import com.datastax.driver.core.ColumnDefinitions; |
48 | | -import com.datastax.driver.core.ConsistencyLevel; |
49 | | -import com.datastax.driver.core.PreparedStatement; |
50 | | -import com.datastax.driver.core.ResultSet; |
51 | | -import com.datastax.driver.core.ResultSetFuture; |
52 | | -import com.datastax.driver.core.Row; |
53 | | -import com.datastax.driver.core.Session; |
54 | | -import com.datastax.driver.core.SimpleStatement; |
55 | | -import com.datastax.driver.core.Statement; |
| 46 | +import com.datastax.driver.core.*; |
56 | 47 | import com.datastax.driver.core.exceptions.InvalidQueryException; |
57 | 48 | import com.datastax.driver.core.exceptions.NoHostAvailableException; |
58 | 49 | import com.datastax.driver.core.policies.DowngradingConsistencyRetryPolicy; |
@@ -578,6 +569,7 @@ public void queryPreparedStatementCreatorAndBinderShouldReturnResult() { |
578 | 569 |
|
579 | 570 | when(session.executeAsync(boundStatement)).thenReturn(new TestResultSetFuture(resultSet)); |
580 | 571 | when(resultSet.iterator()).thenReturn(Collections.singleton(row).iterator()); |
| 572 | +when(resultSet.spliterator()).thenCallRealMethod(); |
581 | 573 |
|
582 | 574 | ListenableFuture<ResultSet> future = template |
583 | 575 | .query(session -> new AsyncResult<PreparedStatement>(preparedStatement), ps -> { |
@@ -773,6 +765,7 @@ private <T> void doTestStrings(Integer fetchSize, ConsistencyLevel consistencyLe |
773 | 765 |
|
774 | 766 | when(this.session.executeAsync((Statement) any())).thenReturn(new TestResultSetFuture(resultSet)); |
775 | 767 | when(this.resultSet.iterator()).thenReturn(Arrays.asList(row, row, row).iterator()); |
| 768 | +when(this.resultSet.spliterator()).thenCallRealMethod(); |
776 | 769 |
|
777 | 770 | when(this.row.getString(0)).thenReturn(results[0], results[1], results[2]); |
778 | 771 |
|
|
0 commit comments