Skip to content

[Backport 7.x] Ensure global test seed is used for all random testing tasks (#38991)#39195

Merged
mark-vieira merged 1 commit intoelastic:7.xfrom
mark-vieira:consistent-test-seed-7.x
Feb 21, 2019
Merged

[Backport 7.x] Ensure global test seed is used for all random testing tasks (#38991)#39195
mark-vieira merged 1 commit intoelastic:7.xfrom
mark-vieira:consistent-test-seed-7.x

Conversation

@mark-vieira
Copy link
Copy Markdown
Contributor

This commit fixes a bug which resulted in every RandomizedTestingTask
generating its own unique test seed rather than using the global test
seed generated by the the RandomizedTestingPlugin.

The issue didn't affect build invocations which explicitly ran with
-Dtest.seed. In those cases, the Ant junit task correctly uses the
global seed.

Since the Ant random testing target looks for an Ant project property
for determining the existing seed we now explicitly set this inside
RandomizedTestingPlugin. It just so happens that, incidentally, Ant will
inherit system properties, thus wy the -Dtest.seed mechanism continued
to work.

  • Use explicit type
  • Have you signed the contributor license agreement?
  • Have you followed the contributor guidelines?
  • If submitting code, have you built your formula locally prior to submission with gradle check?
  • If submitting code, is your pull request against master? Unless there is a good reason otherwise, we prefer pull requests against master and will backport as needed.
  • If submitting code, have you checked that your submission is for an OS that we support?
  • If you are submitting this code for a class then read our policy for that.

@mark-vieira mark-vieira added :Delivery/Build Build or test infrastructure backport v7.2.0 labels Feb 20, 2019
@mark-vieira mark-vieira self-assigned this Feb 20, 2019
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-infra

…#38991)

This commit fixes a bug which resulted in every RandomizedTestingTask
generating its own unique test seed rather than using the global test
seed generated by the the RandomizedTestingPlugin.

The issue didn't affect build invocations which explicitly ran with
-Dtest.seed. In those cases, the Ant junit task correctly uses the
global seed.

Since the Ant random testing target looks for an Ant project property
for determining the existing seed we now explicitly set this inside
RandomizedTestingPlugin. It just so happens that, incidentally, Ant will
inherit system properties, thus wy the -Dtest.seed mechanism continued
to work.

* Use explicit type
@mark-vieira mark-vieira force-pushed the consistent-test-seed-7.x branch from 3f04fc2 to 2c18310 Compare February 21, 2019 00:41
@mark-vieira mark-vieira merged commit 0f68814 into elastic:7.x Feb 21, 2019
@mark-vieira mark-vieira deleted the consistent-test-seed-7.x branch February 21, 2019 16:52
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport :Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team v7.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants