Skip to content

Commit

Permalink
test: fix hang in storage/recovery.test
Browse files Browse the repository at this point in the history
  • Loading branch information
Serpentian committed Aug 11, 2022
1 parent e0289bf commit f8ab617
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/storage/recovery.result
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ _bucket:replace{1, vshard.consts.BUCKET.SENDING, util.replicasets[2]}
---
- [1, 'sending', '<replicaset_2>']
...
vshard.storage.internal.errinj.ERRINJ_RECOVERY_PAUSE = true
---
...
_ = test_run:switch('storage_2_a')
---
...
Expand All @@ -148,6 +151,9 @@ _ = test_run:cmd('start server storage_1_a')
_ = test_run:switch('storage_1_a')
---
...
vshard.storage.internal.errinj.ERRINJ_RECOVERY_PAUSE = false
---
...
_bucket = box.space._bucket
---
...
Expand Down
2 changes: 2 additions & 0 deletions test/storage/recovery.test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ while _bucket:count() ~= 2 do vshard.storage.recovery_wakeup() fiber.sleep(0.1)
--
_ = test_run:switch('storage_1_a')
_bucket:replace{1, vshard.consts.BUCKET.SENDING, util.replicasets[2]}
vshard.storage.internal.errinj.ERRINJ_RECOVERY_PAUSE = true
_ = test_run:switch('storage_2_a')
_bucket:replace{1, vshard.consts.BUCKET.ACTIVE}
_ = test_run:switch('default')
_ = test_run:cmd('stop server storage_2_a')
_ = test_run:cmd('stop server storage_1_a')
_ = test_run:cmd('start server storage_1_a')
_ = test_run:switch('storage_1_a')
vshard.storage.internal.errinj.ERRINJ_RECOVERY_PAUSE = false
_bucket = box.space._bucket
_bucket:select{}
for i = 1, 10 do vshard.storage.recovery_wakeup() end
Expand Down

0 comments on commit f8ab617

Please sign in to comment.