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
[master] test: fix flakiness in gh_6128_background_mode_test (again) #8836
[master] test: fix flakiness in gh_6128_background_mode_test (again) #8836
Conversation
Previous attempt to fix flakiness in commit 6a2c73f ("test: fix flakiness in gh_6128_background_mode_test") used a constant buffer size in check_err_msg function. Tarantool 2.10 has a bit bigger log before a desired message that other versions of Tarantool and it leads to a this resulted in a truncated message ("entering the even" instead of "entering the event loop"). Patch replaces check_err_msg() implementation to grep_log used in luatest, it reads the whole log. Also patch renames check_err_msg to check_msg, because "entering the event loop" is not an error message. Follows up tarantool#6128 NO_CHANGELOG=fix test NO_DOC=fix test
8e37a58
to
4601403
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch! We've discussed in dm, that luatest.Server
can't be used instead of popen
, as it automatically initializes box.cfg{}
, while for the test purposes it should be done from the shell (with -e
). Besides that, as the dummy server in check_msg
is not started, we don't need to kill it, thus it is ok too. Overall, LGTM.
Nit: maybe comment on the issues above in the code.
Function grep_log() could be useful for searching string patterns even when Server instance is not possible. For example a case [1] when we need to start Tarantool instance with our own options. Now for using grep_log one needs create an empty Server instance and then call grep_log() for it. It looks ugly: ```lua local server = t.Server:new({}) local res = server:grep_log(msg, 1024, {filename = file}) ``` Patch moves grep_log() to utils, this allows using grep_log() even Server instance is not used. 1. tarantool/tarantool#8836
Function grep_log() could be useful for searching string patterns even when Server instance is not possible. For example a case [1] when we need to start Tarantool instance with our own options. Now for using grep_log one needs create an empty Server instance and then call grep_log() for it. It looks ugly: ```lua local server = t.Server:new({}) local res = server:grep_log(msg, 1024, {filename = file}) ``` Patch moves grep_log() to utils, this allows using grep_log() even Server instance is not used. 1. tarantool/tarantool#8836 Follows up tarantool/tarantool#6128
Function grep_log() could be useful for searching string patterns even when Server instance is not possible. For example a case [1] when we need to start Tarantool instance with our own options. Now for using grep_log one needs create an empty Server instance and then call grep_log() for it. It looks ugly: ```lua local server = t.Server:new({}) local res = server:grep_log(msg, 1024, {filename = file}) ``` Patch moves grep_log() to utils, this allows using grep_log() even Server instance is not used. 1. tarantool/tarantool#8836 Follows up tarantool/tarantool#6128
Function grep_log() could be useful for searching string patterns even when Server instance is not possible. For example a case [1] when we need to start Tarantool instance with our own options. Now for using grep_log one needs create an empty Server instance and then call grep_log() for it. It looks ugly: ```lua local server = t.Server:new({}) local res = server:grep_log(msg, 1024, {filename = file}) ``` Patch moves grep_log() to utils, this allows using grep_log() even Server instance is not used. 1. tarantool/tarantool#8836 Follows up tarantool/tarantool#6128
Function grep_log() could be useful for searching string patterns even when Server instance is not possible. For example a case [1] when we need to start Tarantool instance with our own options. Now for using grep_log one needs create an empty Server instance and then call grep_log() for it. It looks ugly: ```lua local server = t.Server:new({}) local res = server:grep_log(msg, 1024, {filename = file}) ``` Patch moves grep_log() to utils, this allows using grep_log() even Server instance is not used. 1. tarantool/tarantool#8836 Follows up tarantool/tarantool#6128
Function grep_log() could be useful for searching string patterns even when Server instance is not possible. For example a case [1] when we need to start Tarantool instance with our own options. Now for using grep_log one needs create an empty Server instance and then call grep_log() for it. It looks ugly: ```lua local server = t.Server:new({}) local res = server:grep_log(msg, 1024, {filename = file}) ``` Patch moves grep_log() to utils, this allows using grep_log() even Server instance is not used. 1. tarantool/tarantool#8836 Follows up tarantool/tarantool#6128
Function grep_log() could be useful for searching string patterns even when Server instance is not possible. For example a case [1] when we need to start Tarantool instance with our own options. Now for using grep_log one needs create an empty Server instance and then call grep_log() for it. It looks ugly: ```lua local server = t.Server:new({}) local res = server:grep_log(msg, 1024, {filename = file}) ``` Patch moves grep_log() to utils, this allows using grep_log() even Server instance is not used. 1. tarantool/tarantool#8836 Follows up tarantool/tarantool#6128
Function grep_log() could be useful for searching string patterns even when Server instance is not possible. For example a case [1] when we need to start Tarantool instance with our own options. Now for using grep_log one needs create an empty Server instance and then call grep_log() for it. It looks ugly: ```lua local server = t.Server:new({}) local res = server:grep_log(msg, 1024, {filename = file}) ``` Patch moves grep_log() to utils, this allows using grep_log() even Server instance is not used. 1. tarantool/tarantool#8836 Follows up tarantool/tarantool#6128
NOTE: PR 2.10 - #8834
Previous attempt to fix flakiness in commit 6a2c73f ("test: fix flakiness in gh_6128_background_mode_test") used a constant buffer size in check_err_msg function. Tarantool 2.10 has a bit bigger log before a desired message that other versions of Tarantool and it leads to a this resulted in a truncated message ("entering the even" instead of "entering the event loop"). Patch replaces check_err_msg() implementation to grep_log used in luatest, it reads the whole log.
Also patch renames check_err_msg to check_msg, because "entering the event loop" is not an error message.
Follows up #6128
NO_CHANGELOG=fix test
NO_DOC=fix test