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 seeding for generative policy tests #1508

Merged
merged 1 commit into from
Sep 12, 2022
Merged

Fix seeding for generative policy tests #1508

merged 1 commit into from
Sep 12, 2022

Conversation

SeanTAllen
Copy link
Contributor

We are seeding the testRand module level variable. However, testing/quick was not set to use that seeded random number generator. The testing/quick configuration has a field Rand which is not set, will result in a random number generator being created and used. This created generator hasn't been seeded so our seeding had no impact on any of our Generate functions.

This commit updates all testing/quick tests to initialize Rand in the configuration to be set to our seeded testRand.

Signed-off-by: Sean T. Allen seanallen@microsoft.com

We are seeding the `testRand` module level variable. However, testing/quick
was not set to use that seeded random number generator. The testing/quick
configuration has a field `Rand` which is not set, will result in a
random number generator being created and used. This created generator
hasn't been seeded so our seeding had no impact on any of our `Generate`
functions.

This commit updates all testing/quick tests to initialize `Rand` in the
configuration to be set to our seeded `testRand`.

Signed-off-by: Sean T. Allen <seanallen@microsoft.com>
@SeanTAllen SeanTAllen requested a review from a team as a code owner September 12, 2022 12:58
Copy link
Contributor

@anmaxvl anmaxvl left a comment

Choose a reason for hiding this comment

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

thanks! LGTM

@anmaxvl anmaxvl merged commit b363b0d into microsoft:main Sep 12, 2022
@anmaxvl anmaxvl deleted the fix-generative-seeding branch September 12, 2022 19:39
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.

3 participants