[tarantool-patches] [PATCH v1 4/6] Removed unused variable

avtikhon avtikhon at tarantool.org
Mon Apr 1 17:13:33 MSK 2019


From: avtikhon <avtikhon at gmail.com>

---
 test/replication/autobootstrap_guest.result    | 5 +----
 test/replication/autobootstrap_guest.test.lua  | 3 +--
 test/replication/before_replace.result         | 5 +----
 test/replication/before_replace.test.lua       | 3 +--
 test/replication/errinj.result                 | 5 +----
 test/replication/errinj.test.lua               | 3 +--
 test/replication/hot_standby.result            | 5 +----
 test/replication/hot_standby.test.lua          | 3 +--
 test/replication/join_vclock.result            | 7 ++-----
 test/replication/join_vclock.test.lua          | 3 +--
 test/replication/local_spaces.result           | 5 +----
 test/replication/local_spaces.test.lua         | 3 +--
 test/replication/on_replace.result             | 5 +----
 test/replication/on_replace.test.lua           | 3 +--
 test/replication/recover_missing_xlog.result   | 5 +----
 test/replication/recover_missing_xlog.test.lua | 3 +--
 test/replication/replica_rejoin.result         | 5 +----
 test/replication/replica_rejoin.test.lua       | 3 +--
 test/replication/skip_conflict_row.result      | 5 +----
 test/replication/skip_conflict_row.test.lua    | 3 +--
 test/replication/status.result                 | 5 +----
 test/replication/status.test.lua               | 4 ++--
 test/replication/wal_off.result                | 5 +----
 test/replication/wal_off.test.lua              | 3 +--
 24 files changed, 26 insertions(+), 73 deletions(-)

diff --git a/test/replication/autobootstrap_guest.result b/test/replication/autobootstrap_guest.result
index 1efef310c..dc1098765 100644
--- a/test/replication/autobootstrap_guest.result
+++ b/test/replication/autobootstrap_guest.result
@@ -1,12 +1,9 @@
-env = require('test_run')
+test_run = require('test_run').new()
 ---
 ...
 vclock_diff = require('fast_replica').vclock_diff
 ---
 ...
-test_run = env.new()
----
-...
 SERVERS = { 'autobootstrap_guest1', 'autobootstrap_guest2', 'autobootstrap_guest3' }
 ---
 ...
diff --git a/test/replication/autobootstrap_guest.test.lua b/test/replication/autobootstrap_guest.test.lua
index 3aad8a4da..23329811c 100644
--- a/test/replication/autobootstrap_guest.test.lua
+++ b/test/replication/autobootstrap_guest.test.lua
@@ -1,6 +1,5 @@
-env = require('test_run')
+test_run = require('test_run').new()
 vclock_diff = require('fast_replica').vclock_diff
-test_run = env.new()
 
 SERVERS = { 'autobootstrap_guest1', 'autobootstrap_guest2', 'autobootstrap_guest3' }
 
diff --git a/test/replication/before_replace.result b/test/replication/before_replace.result
index 714825232..5b0cf1382 100644
--- a/test/replication/before_replace.result
+++ b/test/replication/before_replace.result
@@ -1,10 +1,7 @@
 --
 -- Using space:before_replace to resolve replication conflicts.
 --
-env = require('test_run')
----
-...
-test_run = env.new()
+test_run = require('test_run').new()
 ---
 ...
 engine = test_run:get_cfg('engine')
diff --git a/test/replication/before_replace.test.lua b/test/replication/before_replace.test.lua
index 406fd63e7..7cb1c5516 100644
--- a/test/replication/before_replace.test.lua
+++ b/test/replication/before_replace.test.lua
@@ -1,8 +1,7 @@
 --
 -- Using space:before_replace to resolve replication conflicts.
 --
-env = require('test_run')
-test_run = env.new()
+test_run = require('test_run').new()
 engine = test_run:get_cfg('engine')
 
 SERVERS = { 'before_replace1', 'before_replace2', 'before_replace3' }
diff --git a/test/replication/errinj.result b/test/replication/errinj.result
index 05f11cff1..d8caa5614 100644
--- a/test/replication/errinj.result
+++ b/test/replication/errinj.result
@@ -1,7 +1,4 @@
-env = require('test_run')
----
-...
-test_run = env.new()
+test_run = require('test_run').new()
 ---
 ...
 engine = test_run:get_cfg('engine')
diff --git a/test/replication/errinj.test.lua b/test/replication/errinj.test.lua
index 8459bf280..d8b4e4494 100644
--- a/test/replication/errinj.test.lua
+++ b/test/replication/errinj.test.lua
@@ -1,5 +1,4 @@
-env = require('test_run')
-test_run = env.new()
+test_run = require('test_run').new()
 engine = test_run:get_cfg('engine')
 
 errinj = box.error.injection
diff --git a/test/replication/hot_standby.result b/test/replication/hot_standby.result
index f840caa1f..9040f54e8 100644
--- a/test/replication/hot_standby.result
+++ b/test/replication/hot_standby.result
@@ -1,7 +1,4 @@
-env = require('test_run')
----
-...
-test_run = env.new()
+test_run = require('test_run').new()
 ---
 ...
 engine = test_run:get_cfg('engine')
diff --git a/test/replication/hot_standby.test.lua b/test/replication/hot_standby.test.lua
index 94bb29795..568d18d21 100644
--- a/test/replication/hot_standby.test.lua
+++ b/test/replication/hot_standby.test.lua
@@ -1,5 +1,4 @@
-env = require('test_run')
-test_run = env.new()
+test_run = require('test_run').new()
 engine = test_run:get_cfg('engine')
 
 box.schema.user.grant('guest', 'replication')
diff --git a/test/replication/join_vclock.result b/test/replication/join_vclock.result
index d4f69626e..ab16e94ef 100644
--- a/test/replication/join_vclock.result
+++ b/test/replication/join_vclock.result
@@ -1,15 +1,12 @@
-fiber = require('fiber')
+test_run = require('test_run').new()
 ---
 ...
-env = require('test_run')
+fiber = require('fiber')
 ---
 ...
 replica_set = require('fast_replica')
 ---
 ...
-test_run = env.new()
----
-...
 engine = test_run:get_cfg('engine')
 ---
 ...
diff --git a/test/replication/join_vclock.test.lua b/test/replication/join_vclock.test.lua
index 94de3ce06..4a727a797 100644
--- a/test/replication/join_vclock.test.lua
+++ b/test/replication/join_vclock.test.lua
@@ -1,7 +1,6 @@
+test_run = require('test_run').new()
 fiber = require('fiber')
-env = require('test_run')
 replica_set = require('fast_replica')
-test_run = env.new()
 engine = test_run:get_cfg('engine')
 
 errinj = box.error.injection
diff --git a/test/replication/local_spaces.result b/test/replication/local_spaces.result
index da11ebf8c..582fdcff0 100644
--- a/test/replication/local_spaces.result
+++ b/test/replication/local_spaces.result
@@ -1,7 +1,4 @@
-env = require('test_run')
----
-...
-test_run = env.new()
+test_run = require('test_run').new()
 ---
 ...
 engine = test_run:get_cfg('engine')
diff --git a/test/replication/local_spaces.test.lua b/test/replication/local_spaces.test.lua
index 45954b1cd..d9642c17a 100644
--- a/test/replication/local_spaces.test.lua
+++ b/test/replication/local_spaces.test.lua
@@ -1,5 +1,4 @@
-env = require('test_run')
-test_run = env.new()
+test_run = require('test_run').new()
 engine = test_run:get_cfg('engine')
 
 --
diff --git a/test/replication/on_replace.result b/test/replication/on_replace.result
index 3aa0dd38e..f5d03ab9b 100644
--- a/test/replication/on_replace.result
+++ b/test/replication/on_replace.result
@@ -1,10 +1,7 @@
 --
 -- Check that replication applier invokes on_replace triggers
 --
-env = require('test_run')
----
-...
-test_run = env.new()
+test_run = require('test_run').new()
 ---
 ...
 fiber = require('fiber')
diff --git a/test/replication/on_replace.test.lua b/test/replication/on_replace.test.lua
index d0a403218..416c93e38 100644
--- a/test/replication/on_replace.test.lua
+++ b/test/replication/on_replace.test.lua
@@ -2,8 +2,7 @@
 -- Check that replication applier invokes on_replace triggers
 --
 
-env = require('test_run')
-test_run = env.new()
+test_run = require('test_run').new()
 fiber = require('fiber')
 
 _ = box.schema.space.create('test')
diff --git a/test/replication/recover_missing_xlog.result b/test/replication/recover_missing_xlog.result
index 76f55709c..5292bcb3d 100644
--- a/test/replication/recover_missing_xlog.result
+++ b/test/replication/recover_missing_xlog.result
@@ -1,7 +1,4 @@
-env = require('test_run')
----
-...
-test_run = env.new()
+test_run = require('test_run').new()
 ---
 ...
 SERVERS = { 'recover_missing_xlog1', 'recover_missing_xlog2', 'recover_missing_xlog3' }
diff --git a/test/replication/recover_missing_xlog.test.lua b/test/replication/recover_missing_xlog.test.lua
index 73eb405dd..1a340f41b 100644
--- a/test/replication/recover_missing_xlog.test.lua
+++ b/test/replication/recover_missing_xlog.test.lua
@@ -1,5 +1,4 @@
-env = require('test_run')
-test_run = env.new()
+test_run = require('test_run').new()
 
 SERVERS = { 'recover_missing_xlog1', 'recover_missing_xlog2', 'recover_missing_xlog3' }
 test_run:create_cluster(SERVERS, "replication", {args="0.1"})
diff --git a/test/replication/replica_rejoin.result b/test/replication/replica_rejoin.result
index 93e9e450e..8ef7bfb3f 100644
--- a/test/replication/replica_rejoin.result
+++ b/test/replication/replica_rejoin.result
@@ -1,7 +1,4 @@
-env = require('test_run')
----
-...
-test_run = env.new()
+test_run = require('test_run').new()
 ---
 ...
 engine = test_run:get_cfg('engine')
diff --git a/test/replication/replica_rejoin.test.lua b/test/replication/replica_rejoin.test.lua
index 9dcb438bf..32c8e5a36 100644
--- a/test/replication/replica_rejoin.test.lua
+++ b/test/replication/replica_rejoin.test.lua
@@ -1,5 +1,4 @@
-env = require('test_run')
-test_run = env.new()
+test_run = require('test_run').new()
 engine = test_run:get_cfg('engine')
 
 test_run:cleanup_cluster()
diff --git a/test/replication/skip_conflict_row.result b/test/replication/skip_conflict_row.result
index 388ceb80b..6cf71dd84 100644
--- a/test/replication/skip_conflict_row.result
+++ b/test/replication/skip_conflict_row.result
@@ -1,7 +1,4 @@
-env = require('test_run')
----
-...
-test_run = env.new()
+test_run = require('test_run').new()
 ---
 ...
 engine = test_run:get_cfg('engine')
diff --git a/test/replication/skip_conflict_row.test.lua b/test/replication/skip_conflict_row.test.lua
index e86295dd3..2e4d23bfc 100644
--- a/test/replication/skip_conflict_row.test.lua
+++ b/test/replication/skip_conflict_row.test.lua
@@ -1,5 +1,4 @@
-env = require('test_run')
-test_run = env.new()
+test_run = require('test_run').new()
 engine = test_run:get_cfg('engine')
 
 box.schema.user.grant('guest', 'replication')
diff --git a/test/replication/status.result b/test/replication/status.result
index 97a7a7e99..306fb2e2c 100644
--- a/test/replication/status.result
+++ b/test/replication/status.result
@@ -1,7 +1,4 @@
-env = require('test_run')
----
-...
-test_run = env.new()
+test_run = require('test_run').new()
 ---
 ...
 test_run:cmd('restart server default with cleanup=1')
diff --git a/test/replication/status.test.lua b/test/replication/status.test.lua
index d776c45ff..58a2754d8 100644
--- a/test/replication/status.test.lua
+++ b/test/replication/status.test.lua
@@ -1,5 +1,5 @@
-env = require('test_run')
-test_run = env.new()
+test_run = require('test_run').new()
+
 test_run:cmd('restart server default with cleanup=1')
 test_run:cmd('switch default')
 
diff --git a/test/replication/wal_off.result b/test/replication/wal_off.result
index cf195870c..357e6a11b 100644
--- a/test/replication/wal_off.result
+++ b/test/replication/wal_off.result
@@ -1,10 +1,7 @@
 --
 -- gh-1233: JOIN/SUBSCRIBE must fail if master has wal_mode = "none"
 --
-env = require('test_run')
----
-...
-test_run = env.new()
+test_run = require('test_run').new()
 ---
 ...
 test_run:cmd('switch default')
diff --git a/test/replication/wal_off.test.lua b/test/replication/wal_off.test.lua
index 3fe412b5a..79d7ce701 100644
--- a/test/replication/wal_off.test.lua
+++ b/test/replication/wal_off.test.lua
@@ -2,8 +2,7 @@
 -- gh-1233: JOIN/SUBSCRIBE must fail if master has wal_mode = "none"
 --
 
-env = require('test_run')
-test_run = env.new()
+test_run = require('test_run').new()
 test_run:cmd('switch default')
 fiber = require('fiber')
 box.schema.user.grant('guest', 'replication')
-- 
2.17.1





More information about the Tarantool-patches mailing list