From 3e4dea421d639889d54482b138ba0b776590d600 Mon Sep 17 00:00:00 2001 From: Alexander Turenko <alexander.turenko@tarantool.org> Date: Fri, 23 Aug 2019 04:13:58 +0300 Subject: [PATCH] test: tarantoolctl: verify delayed box.cfg() app-tap.tarantoolctl.test.lua fails after 17df9edf013fd262be1b2ffd34d5080d20bc716e ('tarantoolctl: allow to start instances with delayed box.cfg{}'). The commit fixes the test case that did check that an error is reported if box.cfg() was not called in an instance script. Follows up #4435. Fixes #4448. (cherry picked from commit 6c627af390c3fd521ffef77c443aeb3f5cb0b713) --- test/app-tap/tarantoolctl.test.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/app-tap/tarantoolctl.test.lua b/test/app-tap/tarantoolctl.test.lua index df2ee377f3..f38820805d 100755 --- a/test/app-tap/tarantoolctl.test.lua +++ b/test/app-tap/tarantoolctl.test.lua @@ -179,13 +179,18 @@ test:plan(8) do local dir = fio.tempdir() create_script(dir, 'script.lua', [[ box.cfg{memtx_memory = 104857600} ]]) - create_script(dir, 'no_box_cfg.lua', [[ print('Hi!') ]]) + create_script(dir, 'delayed_box_cfg.lua', [[ + local fiber = require('fiber') + fiber.create(function() + fiber.sleep(1) + box.cfg{} + end) + ]]) local status, err = pcall(function() test:test("basic test", function(test_i) test_i:plan(18) - check_ok(test_i, dir, 'start', 'no_box_cfg', 1, nil, "Starting instance", - "box.cfg() is not called in an instance file") + check_ok(test_i, dir, 'start', 'delayed_box_cfg', 0, nil, "Starting instance") 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") -- GitLab