Skip to content

Server artifacts are not saved after restart #409

Open
@locker

Description

@locker

Create the test test/box-luatest/failing_test.lua in the Tarantool repository:

local server = require('luatest.server')
local t = require('luatest')

local g = t.group()

g.before_all(function(cg)
    cg.server = server:new()
    cg.server:start()
end)

g.after_all(function(cg)
    cg.server:drop()
end)

g.test_fail = function(cg)
    cg.server:exec(function()
        box.space._schema:replace{'test', 'ok'}
        t.assert(true)
    end)
    cg.server:restart()
    cg.server:exec(function()
        box.space._schema:replace{'test', 'fail'}
        t.assert(false)
    end)
end

Run it:

cd test
. <(./test-run.py --env)
luatest -v box-luatest/failing_test.lua

Check the artifacts saved to /tmp/t/artifacts. The last message in server.log is:

2025-01-09 12:50:27.063 [83843] main/112/main/test-run.lib.luatest.luatest.log assertions.lua:895 I> Checking assertion at failing_test.lua:18

There's no message for the assertion check executed after the server restart. Also, the server doesn't have {'test', 'fail'} record in the _schema space that was inserted after the restart:

tarantool> box.space._schema:get('test')
---
- ['test', 'ok']
...

Looks like the artifacts were saved before the server restart and not renewed when the test failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions