26
26
27
27
import com .datastax .oss .driver .api .core .CqlSession ;
28
28
import com .datastax .oss .driver .api .core .DefaultProtocolVersion ;
29
+ import com .datastax .oss .driver .api .core .config .DriverExecutionProfile ;
29
30
import com .datastax .oss .driver .api .core .cql .AsyncResultSet ;
30
31
import com .datastax .oss .driver .api .core .cql .ColumnDefinition ;
31
32
import com .datastax .oss .driver .api .core .cql .ColumnDefinitions ;
@@ -55,6 +56,7 @@ public class DefaultAsyncResultSetTest {
55
56
@ Mock private Statement <?> statement ;
56
57
@ Mock private CqlSession session ;
57
58
@ Mock private InternalDriverContext context ;
59
+ @ Mock private DriverExecutionProfile executionProfile ;
58
60
59
61
@ Before
60
62
public void setup () {
@@ -73,7 +75,12 @@ public void should_fail_to_fetch_next_page_if_last() {
73
75
// When
74
76
DefaultAsyncResultSet resultSet =
75
77
new DefaultAsyncResultSet (
76
- columnDefinitions , executionInfo , new ArrayDeque <>(), session , context );
78
+ columnDefinitions ,
79
+ executionInfo ,
80
+ new ArrayDeque <>(),
81
+ session ,
82
+ context ,
83
+ executionProfile );
77
84
78
85
// Then
79
86
assertThat (resultSet .hasMorePages ()).isFalse ();
@@ -95,7 +102,12 @@ public void should_invoke_session_to_fetch_next_page() {
95
102
// When
96
103
DefaultAsyncResultSet resultSet =
97
104
new DefaultAsyncResultSet (
98
- columnDefinitions , executionInfo , new ArrayDeque <>(), session , context );
105
+ columnDefinitions ,
106
+ executionInfo ,
107
+ new ArrayDeque <>(),
108
+ session ,
109
+ context ,
110
+ executionProfile );
99
111
assertThat (resultSet .hasMorePages ()).isTrue ();
100
112
CompletionStage <AsyncResultSet > nextPageFuture = resultSet .fetchNextPage ();
101
113
@@ -113,7 +125,12 @@ public void should_report_applied_if_column_not_present_and_empty() {
113
125
// When
114
126
DefaultAsyncResultSet resultSet =
115
127
new DefaultAsyncResultSet (
116
- columnDefinitions , executionInfo , new ArrayDeque <>(), session , context );
128
+ columnDefinitions ,
129
+ executionInfo ,
130
+ new ArrayDeque <>(),
131
+ session ,
132
+ context ,
133
+ executionProfile );
117
134
118
135
// Then
119
136
assertThat (resultSet .wasApplied ()).isTrue ();
@@ -128,7 +145,8 @@ public void should_report_applied_if_column_not_present_and_not_empty() {
128
145
129
146
// When
130
147
DefaultAsyncResultSet resultSet =
131
- new DefaultAsyncResultSet (columnDefinitions , executionInfo , data , session , context );
148
+ new DefaultAsyncResultSet (
149
+ columnDefinitions , executionInfo , data , session , context , executionProfile );
132
150
133
151
// Then
134
152
assertThat (resultSet .wasApplied ()).isTrue ();
@@ -149,7 +167,8 @@ public void should_report_not_applied_if_column_present_and_false() {
149
167
150
168
// When
151
169
DefaultAsyncResultSet resultSet =
152
- new DefaultAsyncResultSet (columnDefinitions , executionInfo , data , session , context );
170
+ new DefaultAsyncResultSet (
171
+ columnDefinitions , executionInfo , data , session , context , executionProfile );
153
172
154
173
// Then
155
174
assertThat (resultSet .wasApplied ()).isFalse ();
@@ -170,7 +189,8 @@ public void should_report_not_applied_if_column_present_and_true() {
170
189
171
190
// When
172
191
DefaultAsyncResultSet resultSet =
173
- new DefaultAsyncResultSet (columnDefinitions , executionInfo , data , session , context );
192
+ new DefaultAsyncResultSet (
193
+ columnDefinitions , executionInfo , data , session , context , executionProfile );
174
194
175
195
// Then
176
196
assertThat (resultSet .wasApplied ()).isTrue ();
@@ -187,7 +207,12 @@ public void should_fail_to_report_if_applied_if_column_present_but_empty() {
187
207
// When
188
208
DefaultAsyncResultSet resultSet =
189
209
new DefaultAsyncResultSet (
190
- columnDefinitions , executionInfo , new ArrayDeque <>(), session , context );
210
+ columnDefinitions ,
211
+ executionInfo ,
212
+ new ArrayDeque <>(),
213
+ session ,
214
+ context ,
215
+ executionProfile );
191
216
192
217
// Then
193
218
resultSet .wasApplied ();
0 commit comments