Skip to content
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

Fix flaky test #198

Merged
merged 2 commits into from
Apr 18, 2024
Merged

Conversation

oysteintveit-nordicsemi
Copy link
Contributor

Seems like the subtype test has become flaky, after I accidentally named the service equally for the hostname resolution test from #192. This PR fixes that, as well as adding some dependencies for capturing output logs made by the log macros.

@oysteintveit-nordicsemi
Copy link
Contributor Author

Seems like the MSRV of env_logger version 0.11.3 is 1.71. Should I remove the extra test dependencies in favor of keeping this project's MSRV to 1.63.0?

Copy link
Owner

@keepsimple1 keepsimple1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the test! Minor comments inline.

Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Outdated
fastrand = "1.8"
test-log = "0.2.15"
Copy link
Owner

@keepsimple1 keepsimple1 Apr 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First time seeing this crate. Seems neat based on its doc. Is it working well for you?

Since it's for test code only, could we also use its lower version to avoid bumping up MSRV to 1.71?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one was tricky to downgrade for some reason. Cargo kept insisting that we use version 0.2.15 of transitive dependency test-log-macros, despite test-log 0.2.14 depending on version test-log-macros 0.2.14 itself. I've included test-log-macros as a dev dependency just to trick cargo to use the right one, but we never use that dependency directly.

I have not used this crate before myself, but I've found myself adding env_logger::init() to the start of every single test I write. I'll probably start using it from now on.

Copy link
Owner

@keepsimple1 keepsimple1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@keepsimple1 keepsimple1 merged commit 020df6e into keepsimple1:main Apr 18, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants