-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
demo: Add test to verify workload is running with --with-load #40613
Conversation
@knz I was wondering if you knew a better way to do this, the way I'm doing it seems flaky. I want to continuously send this node statistics query to demo until the result I want comes, or timeout and error in the process. I don't know enough about tcl/expect to do this, so this is a first attempt. |
Ah it looks like your recent PR (#40594) might be helpful. |
a8b83d3
to
467280f
Compare
Release justification: Add tests for an existing feature. |
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.
beware of not making the test run for too long in the "happy" case see comment below
Reviewed 1 of 1 files at r1.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @rohany)
pkg/cli/interactive_tests/test_demo_workload.tcl, line 21 at r1 (raw file):
} eexpect "SELECT city, id FROM vehicles WHERE city = \$1"
put the expect in the loop so that you break out as soon as it's there (otherwise you're incurring a 10 second mandatory cost to every run of this test)
I don't think that is correct -- then we will be expecting 10 times + blocking execution of the loop until the expect statement is satisfied. |
You can expect "either something, or nothing after 1 second" |
467280f
to
eeb2e96
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.
Reviewed 1 of 1 files at r2.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @rohany)
exit 1 | ||
} | ||
|
||
interrupt |
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.
you're missing eexpect eof
at the end though.
Adds a test ensuring the workload starts up when running `cockroach demo movr --with-load` Release justification: Low risk test for existing feature. Release note: None
eeb2e96
to
88f4c2f
Compare
TFTR! Fixed that. bors r=knz |
40613: demo: Add test to verify workload is running with --with-load r=knz a=rohany Adds a test ensuring the workload starts up when running `cockroach demo movr --with-load` Addresses part of #40352. Release justification: Add tests for an existing feature. Release note: None Co-authored-by: Rohan Yadav <[email protected]>
Build succeeded |
it seems like this is failing on master... might want to revert this and think of a better way to test. |
actually, i took a look at the logs -- https://teamcity.cockroachdb.com/repository/download/Cockroach_UnitTests/1504667:id/acceptance/TestDockerCLI/test_demo_workload.tcl/runMode%3Ddocker/eb8ba3cc/logs/console-output.log I think we should disable the license acquisition check for this test then. @knz does that sound like the correct thing to do? |
yes, and thanks for doing it |
Adds a test ensuring the workload starts up when running
cockroach demo movr --with-load
Addresses part of #40352.
Release justification: Add tests for an existing feature.
Release note: None