Page MenuHomePhabricator

discovery: new devel.discovery.randomize option
Needs ReviewPublic

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

Details

Reviewers
kevincox
Group Reviewers
hg-reviewers
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
Lint Skipped
Unit
Unit Tests Skipped

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.Mon, Jun 10, 8:39 AM
gracinet updated this revision to Diff 15470.Wed, Jun 12, 2:17 PM