[ 
https://issues.apache.org/jira/browse/IMPALA-8179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16769883#comment-16769883
 ] 

Joe McDonnell commented on IMPALA-8179:
---------------------------------------

Gtest keeps some information in the singleton UnitTest class. This includes a 
random_seed() method, which I believe can be set via the commandline. I'll look 
into this; we could use this for all our srand calls.

> 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]

Reply via email to