Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergei Voronezhskii <sergw@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Vladimir Davydov <vdavydov@tarantool.org>
Subject: [PATCH v3 3/5] test: put require in proper places
Date: Thu,  6 Dec 2018 16:38:50 +0300	[thread overview]
Message-ID: <20181206133852.75633-4-sergw@tarantool.org> (raw)
In-Reply-To: <20181206133852.75633-1-sergw@tarantool.org>

* put `require('fiber')` after each switch server command, because
  sometimes got 'fiber' not defined error
* use `require('fio')` after `require('test_run').new()`, because
  sometimes got 'fio' not defined error

Part of #2436, #3232
---
 test/replication/catch.test.lua      | 1 -
 test/replication/gc.result           | 6 +++---
 test/replication/gc.test.lua         | 2 +-
 test/replication/on_replace.result   | 3 +++
 test/replication/on_replace.test.lua | 1 +
 5 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/test/replication/catch.test.lua b/test/replication/catch.test.lua
index d5de88642..7a531df39 100644
--- a/test/replication/catch.test.lua
+++ b/test/replication/catch.test.lua
@@ -2,7 +2,6 @@ env = require('test_run')
 test_run = env.new()
 engine = test_run:get_cfg('engine')
 
-
 net_box = require('net.box')
 errinj = box.error.injection
 
diff --git a/test/replication/gc.result b/test/replication/gc.result
index 273b77efc..f0cade079 100644
--- a/test/replication/gc.result
+++ b/test/replication/gc.result
@@ -1,6 +1,3 @@
-fio = require 'fio'
----
-...
 test_run = require('test_run').new()
 ---
 ...
@@ -13,6 +10,9 @@ replica_set = require('fast_replica')
 fiber = require('fiber')
 ---
 ...
+fio = require('fio')
+---
+...
 test_run:cleanup_cluster()
 ---
 ...
diff --git a/test/replication/gc.test.lua b/test/replication/gc.test.lua
index 9f79120e9..899319546 100644
--- a/test/replication/gc.test.lua
+++ b/test/replication/gc.test.lua
@@ -1,8 +1,8 @@
-fio = require 'fio'
 test_run = require('test_run').new()
 engine = test_run:get_cfg('engine')
 replica_set = require('fast_replica')
 fiber = require('fiber')
+fio = require('fio')
 
 test_run:cleanup_cluster()
 test_run:cmd("create server replica with rpl_master=default, script='replication/replica.lua'")
diff --git a/test/replication/on_replace.result b/test/replication/on_replace.result
index 8fef8fb14..2e95b90ea 100644
--- a/test/replication/on_replace.result
+++ b/test/replication/on_replace.result
@@ -63,6 +63,9 @@ test_run:cmd("switch replica")
 ---
 - true
 ...
+fiber = require('fiber')
+---
+...
 while box.space.test:count() < 2 do fiber.sleep(0.01) end
 ---
 ...
diff --git a/test/replication/on_replace.test.lua b/test/replication/on_replace.test.lua
index 23a3313b5..e34832103 100644
--- a/test/replication/on_replace.test.lua
+++ b/test/replication/on_replace.test.lua
@@ -26,6 +26,7 @@ session_type
 test_run:cmd("switch default")
 box.space.test:insert{2}
 test_run:cmd("switch replica")
+fiber = require('fiber')
 while box.space.test:count() < 2 do fiber.sleep(0.01) end
 --
 -- applier
-- 
2.18.0

  parent reply	other threads:[~2018-12-06 13:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-16  8:58 [PATCH] test: update test-run Sergei Voronezhskii
2018-11-16  9:27 ` Alexander Turenko
2018-11-16 13:58   ` Re[2]: " Sergei Voronezhskii
2018-11-16 15:41     ` Alexander Turenko
2018-11-26 11:18       ` Re[2]: " Sergei Voronezhskii
2018-11-26 11:27         ` Alexander Turenko
2018-12-04  8:33           ` Re[2]: " Сергей Воронежский
2018-12-06  9:33             ` Re[3]: " Сергей Воронежский
2018-12-06 13:38               ` [PATCH v3 0/5] enable parallel mode for replication tests Sergei Voronezhskii
2018-12-06 13:38                 ` [PATCH v3 1/5] test: cleanup " Sergei Voronezhskii
2018-12-06 13:38                 ` [PATCH v3 2/5] test: errinj for pause relay_send Sergei Voronezhskii
2018-12-06 15:44                   ` Vladimir Davydov
2018-12-06 13:38                 ` Sergei Voronezhskii [this message]
2018-12-06 13:38                 ` [PATCH v3 4/5] test: use wait_cond to check follow status Sergei Voronezhskii
2018-12-06 13:38                 ` [PATCH v3 5/5] test: replication parallel mode on Sergei Voronezhskii
2018-12-06 15:44                 ` [PATCH v3 0/5] enable parallel mode for replication tests Vladimir Davydov
2018-12-18 23:47             ` Re[3]: [PATCH] test: update test-run Сергей Воронежский
2018-12-19  9:00               ` Vladimir Davydov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181206133852.75633-4-sergw@tarantool.org \
    --to=sergw@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov@tarantool.org \
    --subject='Re: [PATCH v3 3/5] test: put require in proper places' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox