You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// // Bring back node to ensure other errors are not thrown on restart
181
-
// if (unavailableOnce && !restartOnce) {
182
-
// c.cassandraCluster.start(2);
183
-
// restartOnce = true;
184
-
// }
185
-
//
186
-
// init(c, 12);
187
-
//
188
-
// if (restartOnce)
189
-
// successfulQuery = true;
190
-
// } catch (UnavailableException e) {
191
-
// assertEquals("Not enough replica available for query at consistency ONE (1 required but only 0 alive)", e.getMessage());
192
-
// unavailableOnce = true;
193
-
// } catch (WriteTimeoutException e) {
194
-
// assertEquals("Cassandra timeout during write query at consistency ONE (1 replica were required but only 0 acknowledged the write)", e.getMessage());
195
-
// writeTimeoutOnce = true;
196
-
// }
197
-
//}
198
-
//// Ensure the full cycle was completed
199
-
//assertTrue(successfulQuery, "Hit testing race condition. [Never completed successfully.] (Shouldn't be an issue.):\n");
200
-
//assertTrue(writeTimeoutOnce, "Hit testing race condition. [Never encountered a ReadTimeoutException.] (Shouldn't be an issue.):\n");
201
-
//assertTrue(unavailableOnce, "Hit testing race condition. [Never encountered an UnavailableException.] (Shouldn't be an issue.):\n");
202
-
//
203
-
//// TODO: Missing test to see if nodes were written to
204
-
//
205
-
//
206
-
//// Test batch writes
207
-
//successfulQuery = false;
208
-
//writeTimeoutOnce = false;
209
-
//unavailableOnce = false;
210
-
//restartOnce = false;
211
-
//for (int i = 0; i < 100; ++i) {
212
-
// try {
213
-
// // Force a WriteTimeoutException to be performed once
214
-
// if (!writeTimeoutOnce) {
215
-
// c.cassandraCluster.forceStop(2);
216
-
// }
217
-
//
218
-
// // Force an UnavailableException to be performed once
// // Bring back node to ensure other errors are not thrown on restart
224
-
// if (unavailableOnce && !restartOnce) {
225
-
// c.cassandraCluster.start(2);
226
-
// restartOnce = true;
227
-
// }
228
-
//
229
-
// init(c, 12, true);
230
-
//
231
-
// if (restartOnce)
232
-
// successfulQuery = true;
233
-
// } catch (UnavailableException e) {
234
-
// assertEquals("Not enough replica available for query at consistency ONE (1 required but only 0 alive)", e.getMessage());
235
-
// unavailableOnce = true;
236
-
// } catch (WriteTimeoutException e) {
237
-
// assertEquals("Cassandra timeout during write query at consistency ONE (1 replica were required but only 0 acknowledged the write)", e.getMessage());
238
-
// writeTimeoutOnce = true;
239
-
// }
240
-
//}
241
-
//// Ensure the full cycle was completed
242
-
//assertTrue(successfulQuery, "Hit testing race condition. [Never completed successfully.] (Shouldn't be an issue.):\n");
243
-
//assertTrue(writeTimeoutOnce, "Hit testing race condition. [Never encountered a ReadTimeoutException.] (Shouldn't be an issue.):\n");
244
-
//assertTrue(unavailableOnce, "Hit testing race condition. [Never encountered an UnavailableException.] (Shouldn't be an issue.):\n");
245
-
//
246
-
//// TODO: Missing test to see if nodes were written to
161
+
162
+
// Test writes
163
+
successfulQuery = false;
164
+
booleanwriteTimeoutOnce = false;
165
+
unavailableOnce = false;
166
+
restartOnce = false;
167
+
for (inti = 0; i < 100; ++i) {
168
+
try {
169
+
// Force a WriteTimeoutException to be performed once
170
+
if (!writeTimeoutOnce) {
171
+
c.cassandraCluster.forceStop(2);
172
+
}
173
+
174
+
// Force an UnavailableException to be performed once
0 commit comments