Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
40821: cli/interactive_tests: deflake some tests r=andreimatei a=knz Release justification: see individual commits ### cli/interactive_tests: make server shutdown more resilient Fixes #40776. Fixes #40788. Fixes #40746. This patch intends to resolve test flakiness in the CLI interactive tests. The flakiness was observed while shutting down servers at the end of tests. The symptom are: - the `cockroach quit` command terminates successfully; - after 5 seconds, the process is still there (its PID is still present); - immediately when the 5-second loop stops and the script attempts to forcefully kill the process, the PID is not there any more; - the server log file indicates the server has shut down successfully. This combination of symptoms suggests that the server shutdown takes approximately 5 seconds. Flakiness occurs because most of the time it shuts down within 5 seconds, and only occasionally takes more than 5 seconds. The patch thus bumps the delay for forceful shutdown up to 30 seconds. Since an escape from the loop (server fails to shut down) incurs a failure of the test, we are expecting this to only occur rarely. Separately, the patch also changes the definition of the separate action `force_stop_server` to immediately kill the process. The 3 callers of this action do not expect a graceful `quit` to succeed anyway. ### cli/interactive_tests: deflake test_log_config_msg Fixes #39720. This test checks that the cluster ID is reported at the start of the log file(s). Prior to this patch, it would check this by starting a server, then quitting it immediately, and then looking at the resulting log file. This logic was flawed, because it is possible for `cockroach quit` to instruct a server to shut down before it has completed its (informational) report in the log file. This patch resolves this bug by waiting for the expected log output *before* quitting the server instead of afterwards. Co-authored-by: Raphael 'kena' Poss <knz@thaumogen.net>
- Loading branch information