Page MenuHomePhabricator

discovery: new devel.discovery.randomize option
ClosedPublic

Authored by gracinet on May 22 2019, 12:50 PM.

Details

Summary

By default, this is True, but setting it to False is a uniform
way to kill all randomness in integration tests such as test-setdiscovery.t

By "uniform" we mean that it can be passed to implementations in other
languages, for which the monkey-patching of random.sample would be
irrelevant.

In the above mentioned test file, we use it right away,
replacing the adhoc extension that had the same purpose, and to derandomize a
case with many round-trips, that we'll need to behave uniformly in the Rust
version.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

gracinet created this revision.May 22 2019, 12:50 PM

@kevincox this used to be D6346
I had to fix conflict and adapt the test due to growing sample size having landed since then

kevincox accepted this revision.Jun 10 2019, 8:39 AM
gracinet updated this revision to Diff 15470.Jun 12 2019, 2:17 PM
Alphare updated this revision to Diff 15937.Jul 17 2019, 12:30 PM
Alphare updated this revision to Diff 16015.Jul 23 2019, 5:15 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.