Skip to content
Snippets Groups Projects
Commit fc7a16f8 authored by Roman Tsisyk's avatar Roman Tsisyk
Browse files

Fix replication/prune.test.lua

Update the test after #1219 - proper removal of servers
parent 42e4b29b
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ print '-------------------------------------------------------------'
env = require('test_run')
---
...
test_run = env.new('127.0.0.1', 8080)
test_run = env.new()
---
...
replica_set = require('fast_replica')
......@@ -71,7 +71,7 @@ box.space._cluster:len() == 1
---
- true
...
#box.info.vclock == 1
#box.info.vclock == box.schema.REPLICA_MAX - 1
---
- true
...
......@@ -104,7 +104,7 @@ box.space._cluster:len() == 2
---
- true
...
#box.info.vclock == 2
#box.info.vclock == box.schema.REPLICA_MAX - 1
---
- true
...
......@@ -116,7 +116,7 @@ box.space._cluster:len() == 1
---
- true
...
#box.info.vclock == 1
#box.info.vclock == box.schema.REPLICA_MAX - 1
---
- true
...
......
......@@ -3,7 +3,7 @@ print 'gh-806: cant prune old replicas by deleting their server ids'
print '-------------------------------------------------------------'
env = require('test_run')
test_run = env.new('127.0.0.1', 8080)
test_run = env.new()
replica_set = require('fast_replica')
fiber = require('fiber')
......@@ -31,7 +31,7 @@ box.space._cluster:insert{box.schema.REPLICA_MAX, uuid.str()}
-- Delete all replication nodes
replica_set.drop_all(test_run)
box.space._cluster:len() == 1
#box.info.vclock == 1
#box.info.vclock == box.schema.REPLICA_MAX - 1
-- Save a snapshot without removed replicas in vclock
box.snapshot()
......@@ -48,11 +48,11 @@ while box.space._cluster:len() ~= 2 do fiber.sleep(0.001) end
test_run:cmd('eval replica1 "return box.info.server.id"')
box.space._cluster:len() == 2
#box.info.vclock == 2
#box.info.vclock == box.schema.REPLICA_MAX - 1
-- Cleanup
replica_set.drop_all(test_run)
box.space._cluster:len() == 1
#box.info.vclock == 1
#box.info.vclock == box.schema.REPLICA_MAX - 1
box.space.test:drop()
box.schema.user.revoke('guest', 'read,write,execute', 'universe')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment