[tarantool-patches] [PATCH 1/3] Fix test on bucket_transferring error
AKhatskevich
avkhatskevich at tarantool.org
Wed Jun 6 18:57:12 MSK 2018
---
test/router/router.result | 12 ++++++------
test/router/router.test.lua | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/test/router/router.result b/test/router/router.result
index 101369a..5f3ceca 100644
--- a/test/router/router.result
+++ b/test/router/router.result
@@ -328,17 +328,17 @@ test_run:cmd('switch storage_2_a')
---
- true
...
-box.space._bucket:replace({1, vshard.consts.BUCKET.SENDING})
+box.space._bucket:replace({1, vshard.consts.BUCKET.SENDING, '<replicaset_1>'})
---
-- [1, 'sending']
+- [1, 'sending', '<replicaset_1>']
...
test_run:cmd('switch storage_1_a')
---
- true
...
-box.space._bucket:replace({1, vshard.consts.BUCKET.RECEIVING})
+box.space._bucket:replace({1, vshard.consts.BUCKET.RECEIVING, '<replicaset_2>'})
---
-- [1, 'receiving']
+- [1, 'receiving', '<replicaset_2>']
...
test_run:cmd('switch router_1')
---
@@ -353,7 +353,7 @@ vshard.router.call(1, 'read', 'echo', {123})
util.check_error(vshard.router.call, 1, 'write', 'echo', {123})
---
- null
-- {'type': 'ShardingError', 'code': 7, 'bucket_id': 1}
+- {'type': 'ShardingError', 'bucket_id': 1, 'code': 7, 'destination': '<replicaset_1>'}
...
test_run:cmd('switch storage_2_a')
---
@@ -369,7 +369,7 @@ test_run:cmd('switch storage_1_a')
...
box.space._bucket:delete({1})
---
-- [1, 'receiving']
+- [1, 'receiving', '<replicaset_2>']
...
test_run:cmd('switch router_1')
---
diff --git a/test/router/router.test.lua b/test/router/router.test.lua
index 62d6730..fae8e24 100644
--- a/test/router/router.test.lua
+++ b/test/router/router.test.lua
@@ -119,9 +119,9 @@ replicaset, err = vshard.router.bucket_discovery(1); return err == nil or err
replicaset, err = vshard.router.bucket_discovery(2); return err == nil or err
test_run:cmd('switch storage_2_a')
-box.space._bucket:replace({1, vshard.consts.BUCKET.SENDING})
+box.space._bucket:replace({1, vshard.consts.BUCKET.SENDING, 'cbf06940-0790-498b-948d-042b62cf3d29'})
test_run:cmd('switch storage_1_a')
-box.space._bucket:replace({1, vshard.consts.BUCKET.RECEIVING})
+box.space._bucket:replace({1, vshard.consts.BUCKET.RECEIVING, 'ac522f65-aa94-4134-9f64-51ee384f1a54'})
test_run:cmd('switch router_1')
-- Ok to read sending bucket.
vshard.router.call(1, 'read', 'echo', {123})
--
2.14.1
More information about the Tarantool-patches
mailing list