[Tarantool-patches] [PATCH] test: ensure instances are stopped in tctl test

Alexander Turenko alexander.turenko at tarantool.org
Fri Nov 15 04:19:55 MSK 2019


The problem appears after 6c627af390c3fd521ffef77c443aeb3f5cb0b713
('test: tarantoolctl: verify delayed box.cfg()'), where the test case
was changed and it doesn't more assume an error at the instance start.
So we need to stop it to prevent a situation when instances are stays
after `make test`.

Fixes #4600.
---

https://github.com/tarantool/tarantool/issues/4600
https://github.com/tarantool/tarantool/tree/Totktonada/gh-4600-fix-tarantoolctl-test

BTW, thanks for the report! That was my mistake.

 test/app-tap/tarantoolctl.test.lua | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/test/app-tap/tarantoolctl.test.lua b/test/app-tap/tarantoolctl.test.lua
index f38820805..7a07860f2 100755
--- a/test/app-tap/tarantoolctl.test.lua
+++ b/test/app-tap/tarantoolctl.test.lua
@@ -189,8 +189,13 @@ do
 
     local status, err = pcall(function()
         test:test("basic test", function(test_i)
-            test_i:plan(18)
-            check_ok(test_i, dir, 'start', 'delayed_box_cfg', 0, nil, "Starting instance")
+            test_i:plan(20)
+            local script = 'delayed_box_cfg'
+            check_ok(test_i, dir, 'start', script, 0, nil, "Starting instance")
+            tctl_wait_start(dir, script)
+            check_ok(test_i, dir, 'stop', script, 0, nil, "Stopping")
+            tctl_wait_stop(dir, script)
+
             check_ok(test_i, dir, 'start',  'script', 0, nil, "Starting instance")
             tctl_wait_start(dir, 'script')
             check_ok(test_i, dir, 'status', 'script', 0, nil, "is running")
-- 
2.22.0



More information about the Tarantool-patches mailing list