Skip to content

Commit 7ff85fa

Browse files
committed
test_default_policy_is_tablet_aware: Reorder a few operations
I want to introduce retries in case of schema migrations. It will be easier if per-attempt operations are together, separate from one-time setup.
1 parent a185d4c commit 7ff85fa

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

scylla/tests/integration/load_balancing/tablets.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,15 +293,11 @@ async fn test_default_policy_is_tablet_aware() {
293293
/* Prepare schema */
294294
prepare_schema(&session, &ks, "t", TABLET_COUNT).await;
295295

296-
let tablets = get_tablets(&session, &ks, "t").await;
297-
298296
let prepared = session
299297
.prepare(format!("INSERT INTO {ks}.t (a, b, c) VALUES (?, ?, 'abc')"))
300298
.await
301299
.unwrap();
302300

303-
let value_lists = calculate_key_per_tablet(&tablets, &prepared);
304-
305301
let (feedback_txs, mut feedback_rxs): (Vec<_>, Vec<_>) = (0..3)
306302
.map(|_| mpsc::unbounded_channel::<(ResponseFrame, Option<TargetShard>)>())
307303
.unzip();
@@ -313,6 +309,9 @@ async fn test_default_policy_is_tablet_aware() {
313309
)]));
314310
}
315311

312+
let tablets = get_tablets(&session, &ks, "t").await;
313+
let value_lists = calculate_key_per_tablet(&tablets, &prepared);
314+
316315
populate_internal_driver_tablet_info(
317316
&session,
318317
&prepared,

0 commit comments

Comments
 (0)