Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/15982 )

Change subject: IMPALA-9743: Fix ExprCardinalityTest may not be marked as in 
test env
......................................................................

IMPALA-9743: Fix ExprCardinalityTest may not be marked as in test env

ExprCardinalityTest should be run with RuntimeEnv.INSTANCE.isTestEnv()
being true. Otherwise, it will leave the test catalog in a bad shape and
fail subsequent tests. The key point it depends on this flag is in
HdfsTable.resetPartitions(), where isStoredInImpaladCatalogCache()
returns false if the flag is not set and then partitionValuesMap_ of the
HdfsTable becomes empty. The test catalog is shared across some tests.
Any other tests that depend on this partitionValuesMap will fail with an
IndexOutOfBoundsException.

Maven tests are run in undetermined orders. Many FE tests will set this
flag, i.e. explicitly call RuntimeEnv.INSTANCE.setTestEnv(true). It’s
safe if any of these tests run before ExprCardinalityTest. However, in
some Jenkins jobs, somehow ExprCardinalityTest is run earlier than any
of these tests, which causes the failures.

Tests:
 - Manually run ExprCardinalityTest before an impacted FE test, e.g.
(pushd fe && mvn test -Dtest=ExprCardinalityTest#testMetadata,AnalyzeDDLTest)

Change-Id: I5806dea77eb8e10ccf8ac749b7256603bd79cd97
Reviewed-on: http://gerrit.cloudera.org:8080/15982
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M fe/src/test/java/org/apache/impala/analysis/ExprCardinalityTest.java
1 file changed, 7 insertions(+), 0 deletions(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

--
To view, visit http://gerrit.cloudera.org:8080/15982
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I5806dea77eb8e10ccf8ac749b7256603bd79cd97
Gerrit-Change-Number: 15982
Gerrit-PatchSet: 3
Gerrit-Owner: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Andrew Sherman <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>

Reply via email to