Skip to content

Commit 5ca27b9

Browse files
committed
test: fix flaky rebalancer/rebalancer.test.lua
After the previuos commit the test became pretty flaky and fails with error "Duplicate key exists in unique index 'pk' in space '_bucket'", when trying to force create buckets. Let's properly wait for all buckets to be garbage collected and not just one, as it was before. Follow-up #351 NO_DOC=test
1 parent 642f4fa commit 5ca27b9

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

test/rebalancer/rebalancer.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ test_run:switch('box_1_a')
360360
vshard.storage.rebalancer_disable()
361361
---
362362
...
363-
wait_bucket_is_collected(100)
363+
for i = 91, 100 do wait_bucket_is_collected(i) end
364364
---
365365
...
366366
vshard.storage.bucket_force_create(91, 10)

test/rebalancer/rebalancer.test.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ util.map_bucket_protection(test_run, {REPLICASET_1}, true)
181181
--
182182
test_run:switch('box_1_a')
183183
vshard.storage.rebalancer_disable()
184-
wait_bucket_is_collected(100)
184+
for i = 91, 100 do wait_bucket_is_collected(i) end
185185
vshard.storage.bucket_force_create(91, 10)
186186
space = box.space.test
187187
space:replace{1, 91}

0 commit comments

Comments
 (0)