test: fix flaky config-luatest/validate_names_test
Sometimes the test fails with "Peer closed" error, logs says, that fatal error happened: cfg_get('read_only'). This is caused by the instance processing its own ballot. The problem is that we set box.cfg to function in before_all trigger, so it's impossible to access box.cfg table during the whole time of test execution. Let's instead set box.cfg to function at the start of every test and restore box.cfg at the end. This way we'll decrease the time, in which such fatal error can happen. Even though it's still possible to get it in theory, the problem is not reproduced anymore. The alternative solution of introducing errinj seems to be overhead here. Closes tarantool/tarantool-qa#329 NO_DOC=testfix NO_CHANGELOG=testfix
Loading
Please register or sign in to comment