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

rt: fix rng_seed test for threaded runtime #5133

Merged
merged 1 commit into from Oct 27, 2022

Conversation

hds
Copy link
Contributor

@hds hds commented Oct 27, 2022

Motivation

The improvement to the rng_seed tests added in #5075 missed a case in the rt_threaded tests which was still checking for a specific value. As described in that PR, this makes the tests fragile and changing tokio internals may require updating the test.

Solution

This change fixes that half-implemented improvement so that the tests no longer depend on the exact internal ordering, but rather compare two runs of separate runtimes built with the same seed to check that the results are the same.

The improvement to the `rng_seed` tests added in #5075 missed a case in
the `rt_threaded` tests which was still checking for a specific value.
As described in that PR, this makes the tests fragile and changing tokio
internals may require updating the test.

This change fixes that half-implemented improvement so that the tests no
longer depend on the exact internal ordering, but rather compare two
runs of separate runtimes built with the same seed to check that the
results are the same.
@hds hds merged commit 4bcd08b into master Oct 27, 2022
@hds hds deleted the hds/rng-seed-threaded-test-fix branch October 27, 2022 16:29
@Darksonn Darksonn added A-tokio Area: The main tokio crate M-runtime Module: tokio/runtime labels Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-runtime Module: tokio/runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants