Quanlong Huang has uploaded this change for review. ( http://gerrit.cloudera.org:8080/19195
Change subject: IMPALA-11699: Fix NPE in FE tests thrown from static code of FileSystemUtil ...................................................................... IMPALA-11699: Fix NPE in FE tests thrown from static code of FileSystemUtil FileSystemUtil has static code to get configuration from BackendConfig.INSTANCE which could be null in some FE tests. In commit c1610a163 of IMPALA-11469, we fixed the issue by modifying the failed FE tests to extend FrontendTestBase which can make sure BackendConfig.INSTANCE is initialized. However, AcidUtilsTest and TestCaseLoaderTest also have the issue. But they are missed since the issue depends on the test order. If a test that inits BackendConfig.INSTANCE runs first, the following tests won't suffer this issue. To avoid new tests hitting this issue, this patch inits BackendConfig.INSTANCE in need in the static code of FileSystemUtil. Also adds a warning mentioning this should only happen in tests. Tests: - Run FE tests one by one so each test won't depend on any previous env. Only found AcidUtilsTest and TestCaseLoaderTest have the issue. Verified this patch fixes the issue in these two tests. Change-Id: I5c056791406cd4535a7e43889dbb73d153b06f0a --- M fe/src/main/java/org/apache/impala/common/FileSystemUtil.java 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/95/19195/1 -- To view, visit http://gerrit.cloudera.org:8080/19195 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I5c056791406cd4535a7e43889dbb73d153b06f0a Gerrit-Change-Number: 19195 Gerrit-PatchSet: 1 Gerrit-Owner: Quanlong Huang <[email protected]>
