This is an automated email from the ASF dual-hosted git repository.
qiangcai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/carbondata.git
The following commit(s) were added to refs/heads/master by this push:
new e9b38cd [HOTFIX] Fix a random CI failure in HiveCarbonTest:
'metastore_db' already exists
e9b38cd is described below
commit e9b38cd1cd6cb46f0bd3d5578d1ad4752472ad5d
Author: haomarch <[email protected]>
AuthorDate: Thu Nov 26 20:35:00 2020 +0800
[HOTFIX] Fix a random CI failure in HiveCarbonTest: 'metastore_db' already
exists
Why is this PR needed?
HiveCarbonTest will fails randomly, the exception message is as below:
Dictionary 'metastore_db' exists. However, it does not contain the expected
'service.properties' file.
The root cause maybe there is stale metastore_db dictionary in the
filesystem.
What changes were proposed in this PR?
Clean the metastore_db dictionary before testcase running.
Does this PR introduce any user interface change?
No
Is any new testcase added?
No
This closes #4028
---
.../hive/src/test/java/org/apache/carbondata/hive/HiveTestUtils.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git
a/integration/hive/src/test/java/org/apache/carbondata/hive/HiveTestUtils.java
b/integration/hive/src/test/java/org/apache/carbondata/hive/HiveTestUtils.java
index 6eabc25..db49f3e 100644
---
a/integration/hive/src/test/java/org/apache/carbondata/hive/HiveTestUtils.java
+++
b/integration/hive/src/test/java/org/apache/carbondata/hive/HiveTestUtils.java
@@ -46,6 +46,11 @@ public abstract class HiveTestUtils {
try {
File rootPath = new File(HiveTestUtils.class.getResource("/").getPath()
+ "../../../..");
String targetLoc = rootPath.getAbsolutePath() +
"/integration/hive/target/warehouse";
+ String metadatadbLoc = rootPath.getAbsolutePath() +
"/integration/hive/target/metastore_db";
+ File file = new File(metadatadbLoc);
+ if (file.exists()) {
+ file.delete();
+ }
hiveEmbeddedServer2 = new HiveEmbeddedServer2();
hiveEmbeddedServer2.start(targetLoc);
int port = hiveEmbeddedServer2.getFreePort();