[
https://issues.apache.org/jira/browse/IMPALA-8179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16765216#comment-16765216
]
Joe McDonnell edited comment on IMPALA-8179 at 2/11/19 5:59 PM:
----------------------------------------------------------------
I will provide a way to override the seed. That was something I had meant to do
and forgot.
We were seeding with time before this latest change. All of our tests call
InitCommonRuntime() (e.g.
[IMPALA_TEST_MAIN()|https://github.com/apache/impala/blob/master/be/src/testutil/gtest-util.h#L55]),
and that calls srand(time(NULL)):
[https://github.com/apache/impala/blob/master/be/src/common/init.cc#L201]
was (Author: joemcdonnell):
I will provide a way to override the seed. That was something I had meant to do
and forgot.
We were seeding with time before this latest change. All of our tests call
InitCommonRuntime() (e.g. [[IMPALA_TEST_MAIN()
||https://github.com/apache/impala/blob/master/be/src/testutil/gtest-util.h#L55]
[https://github.com/apache/impala/blob/master/be/src/testutil/gtest-util.h#L55]
[]|https://github.com/apache/impala/blob/master/be/src/testutil/gtest-util.h#L55]),
and that calls srand(time(NULL)):
[https://github.com/apache/impala/blob/master/be/src/common/init.cc#L201]
> 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]