Commit 1998141
committed
scylla/3.11.x: fix ShardAwarenessTest for Scylla 2025.1
Two Scylla 2025.1 changes break correctShardInTracingTest:
1. Tablets enabled by default for NTS keyspaces make the driver's
hash-based getShardId() prediction non-deterministic, so the
hardcoded expected shards ("shard 0" / "shard 1") become
unreliable. Fix: ADD TABLETS = {'enabled': false} to the CREATE
KEYSPACE statement to restore traditional token-based shard
assignment.
2. A new coordinator-side trace event runs on shard 0 regardless of
the data shard, causing the previous per-event assertion to fail.
Fix: only assert the shard for events whose description contains
"querying locally" (the data-local event).
Also:
- Thread names now include a /sl:<service_level> suffix (e.g.
"shard 0/sl:default"). Strip it before the startsWith() comparison.
- assertThat(anyLocal) was a no-op BooleanAssert (never called
.isTrue()). Replace with assertTrue(anyLocal) so the liveness
guard actually fires.1 parent 5f4f988 commit 1998141
1 file changed
Lines changed: 8 additions & 3 deletions
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
| 91 | + | |
| 92 | + | |
88 | 93 | | |
89 | 94 | | |
90 | | - | |
| 95 | + | |
91 | 96 | | |
92 | 97 | | |
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
98 | | - | |
| 103 | + | |
99 | 104 | | |
100 | 105 | | |
101 | 106 | | |
| |||
0 commit comments