Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server artifacts are not saved after restart #409

Open
locker opened this issue Jan 9, 2025 · 0 comments
Open

Server artifacts are not saved after restart #409

locker opened this issue Jan 9, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@locker
Copy link
Member

locker commented Jan 9, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant