From fc7a16f8716b94052aecb08291de602061272ef4 Mon Sep 17 00:00:00 2001
From: Roman Tsisyk <roman@tsisyk.com>
Date: Fri, 29 Jan 2016 09:04:08 +0300
Subject: [PATCH] Fix replication/prune.test.lua

Update the test after #1219 - proper removal of servers
---
 test/replication/prune.result   | 8 ++++----
 test/replication/prune.test.lua | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/test/replication/prune.result b/test/replication/prune.result
index 10a7c3579c..31e1a27058 100644
--- a/test/replication/prune.result
+++ b/test/replication/prune.result
@@ -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
 ...
diff --git a/test/replication/prune.test.lua b/test/replication/prune.test.lua
index da55d6eed1..4505d782b2 100644
--- a/test/replication/prune.test.lua
+++ b/test/replication/prune.test.lua
@@ -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')
-- 
GitLab