[
https://issues.apache.org/jira/browse/IMPALA-8179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16765094#comment-16765094
]
Tim Armstrong commented on IMPALA-8179:
---------------------------------------
Providing a mechanism to seed them is a good idea. I disagree with seeding them
by default - I don't think a test is flaky just because its randomised. If
tests are randomised they need to be written carefully so that they're only
testing actual invariants of the code, but we have a bunch of tests that fit
that category. If we have a product bug or a poorly-written test we'd rather
know than masking it by derandomising the test.
> Backend tests are flaky: time-based srand
> -----------------------------------------
>
> Key: IMPALA-8179
> URL: https://issues.apache.org/jira/browse/IMPALA-8179
> Project: IMPALA
> Issue Type: Bug
> Components: Backend
> Affects Versions: Impala 3.2.0
> Reporter: Jim Apple
> Assignee: Joe McDonnell
> Priority: Major
>
> https://gerrit.cloudera.org/#/c/12124/9/be/src/service/unified-betest-main.cc
> added
> {noformat}
> uint32_t seed = time(NULL);
> cout << "seed = " << seed << endl;
> srand(seed);
> {noformat}
> There is no way to force the seed, and backend tests using {{rand()}} are
> then flaky by default. We should make them unflaky by default (using a
> specific random seed) and we should also provide a way to override this by
> setting it by time or to a specific seed for just one run, to help with
> debugging.
> If we want the coverage that comes from running with a different seed each
> time, we could run a test multiple times.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]