Skip to content

Commit 10a8a86

Browse files
committed
test fixes
1 parent f062b4d commit 10a8a86

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

scylla/tests/integration/shard_aware_batching.rs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -197,16 +197,21 @@ async fn run_test(
197197
.await
198198
.expect("Each node should have received at least one message")
199199
.1
200-
.expect("Calls should be shard-aware")
200+
.unwrap_or({
201+
// Cassandra case (non-scylla)
202+
0
203+
})
201204
.into(),
202205
);
203-
loop {
204-
match rx.try_recv() {
205-
Ok((_, call_shard)) => {
206-
shards_calls.push(call_shard.expect("Calls should all be shard-aware").into())
207-
}
208-
Err(_) => break,
209-
}
206+
while let Ok((_, call_shard)) = rx.try_recv() {
207+
shards_calls.push(
208+
call_shard
209+
.unwrap_or({
210+
// Cassandra case (non-scylla)
211+
0
212+
})
213+
.into(),
214+
)
210215
}
211216
nodes_shards_calls.push(shards_calls);
212217
}

0 commit comments

Comments
 (0)