Skip to content

Commit

Permalink
acceptance: stabilize start-single-node in tcl test
Browse files Browse the repository at this point in the history
We've continued to see flakes on this test which contain messages of
throttled stores on node startup. The hypothesis is that these are due
to leftover data directories from prior startups during the same test.

This change clears the `logs/db` data directory for those invocations
and also adds the sql memory flag which the common tcl function also
uses.

Resolves #108405
Epic: None

Release note: None
  • Loading branch information
dhartunian committed Aug 9, 2023
1 parent b91c919 commit 64d2b3f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/cli/interactive_tests/test_missing_log_output.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,30 @@ eexpect ":/# "
stop_server $argv

start_test "Check that a server started with --logtostderr logs even info messages to stderr."
send "$argv start-single-node -s=path=logs/db --insecure --logtostderr\r"
send "$argv start-single-node --max-sql-memory=128MB -s=path=logs/db --insecure --logtostderr\r"
eexpect "CockroachDB node starting"
end_test

# Stop it.
interrupt
interrupt
eexpect ":/# "
system "rm -rf logs/db"

start_test "Check that --logtostderr can override the threshold but no error is printed on startup"
send "echo marker; $argv start-single-node -s=path=logs/db --insecure --logtostderr=ERROR 2>&1 | grep -v '^\\*'\r"
send "echo marker; $argv start-single-node --max-sql-memory=128MB -s=path=logs/db --insecure --logtostderr=ERROR 2>&1 | grep -v '^\\*'\r"
eexpect "marker\r\nCockroachDB node starting"
end_test

# Stop it.
interrupt
interrupt
eexpect ":/# "
system "rm -rf logs/db"


start_test "Check that panic reports are printed to the log even when --logtostderr is specified"
send "$argv start-single-node -s=path=logs/db --insecure --logtostderr\r"
send "$argv start-single-node --max-sql-memory=128MB -s=path=logs/db --insecure --logtostderr\r"
eexpect "CockroachDB node starting"

system "($argv sql --insecure -e \"select crdb_internal.force_panic('helloworld')\" || true)&"
Expand Down

0 comments on commit 64d2b3f

Please sign in to comment.