-
Notifications
You must be signed in to change notification settings - Fork 316
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
test: more readable logging for smoke tests #5099
Conversation
Moving the smoke test invocations out of the process-compose wrapper, preferring running raw `cargo test` invocations instead. Doing so ensures that the test output is readable, both locally, and crucially in CI.
0a67537
to
7a71867
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.
Added a few comments in-line to guide review.
@@ -39,9 +40,9 @@ const TIMEOUT_COMMAND_SECONDS: u64 = 20; | |||
// The "unbonding_delay" value is specified in blocks, and in the smoke tests, | |||
// block time is set to ~500ms, so we'll take the total number of blocks | |||
// that must elapse and sleep half that many seconds. | |||
static UNBONDING_DURATION: Lazy<Duration> = Lazy::new(|| { | |||
static UNBONDING_DELAY: Lazy<Duration> = Lazy::new(|| { |
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.
Renamed for consistency, so the value is greppable throughout the tests.
.unwrap_or_else(|_| "http://127.0.0.1:8080".to_owned()) | ||
.parse() | ||
.expect("failed to parse PENUMBRA_NODE_PD_URL"); | ||
|
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.
Added a sane default for which grpc node pcli should talk to, same as already exists in the other tests. This value takes precedence when no env var override exists.
@@ -36,8 +36,11 @@ else | |||
use_tui="false" | |||
fi | |||
|
|||
# Set unique API port for controlling running services. | |||
export PC_PORT_NUM="8888" | |||
|
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.
TODO: we can and should use unix sockets where possible, but I'm punting on that for now, and just using 8888/TCP for the compose API port.
let blocks: f64 = std::env::var("UNBONDING_DELAY") | ||
.unwrap_or("100".to_string()) | ||
.unwrap_or("50".to_string()) |
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.
Adjusted default value to match what we being set in the smoke tests, via env var override.
Describe your changes
Moving the smoke test invocations out of the process-compose wrapper, preferring running raw
cargo test
invocations instead. Doing so ensures that the test output is readable, both locally, and crucially in CI.Screenshot before
Screenshot after
Issue ticket number and link
No guiding issue, just trying to improve the testing setup opportunistically. We did have inscrutable smoke test failures on #5063 & #5081, both of which were failures of the new pindexer integration tests (#5057), but it was hard to see the specific failure at a glance, which slowed down development.
Testing and review
Check the CI logs for the smoke test job. Are they readable? Consider running
just smoke
locally and confirm the same.Checklist before requesting a review
I have added guiding text to explain how a reviewer should test these changes.
If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason: