Open ligurio opened 2 years ago
It may be helpful: https://github.com/golang/go/issues/37206
I have found only one simple way: kill child processes .
I works but this is OS-dependent code. It should be implemented after supporting of all target platforms on CI, after #157 at least.
Another way is to add guard code to each test case which will catch a panic.
func catchPanic() {
if (recover() != nil) {
// stop Tarantool
}
}
func TestCase(t *testing.T) {
defer catchPanic()
// test code
}
But there are may be issues with subtests.
other solution is to use unix sockets
other solution is to use unix sockets
Could you please explain how this can help?
panic()
. I don't know why. The test has a linedefer test_helpers.StopTarantoolWithCleanup(instance)
, according to blog post Defer, Panic, and Recover deferred function should be executed eve in case ofpanic()
:StartTarantool()
is not failed when Tarantool is already run on the same TCP portVersion: d3b5696ec23b46fcdfbd72d975882d44d5341897