Skip to content
Permalink
Browse files
[MINOR] Fixing integ test suite for hudi-aws and archival validation (#…
  • Loading branch information
nsivabalan committed Nov 29, 2021
1 parent eca1693 commit 52aae36b53e22bd7dab8c024ca64f40a1ade13be
Showing 2 changed files with 12 additions and 15 deletions.
@@ -84,29 +84,25 @@ public void execute(ExecutionContext executionContext, int curItrCount) throws E

String metadataPath = executionContext.getHoodieTestSuiteWriter().getCfg().targetBasePath + "/.hoodie";
FileStatus[] metaFileStatuses = fs.listStatus(new Path(metadataPath));
boolean archFound = false;
boolean cleanFound = false;
for (FileStatus fileStatus : metaFileStatuses) {
Matcher archFileMatcher = ARCHIVE_FILE_PATTERN.matcher(fileStatus.getPath().getName());
if (archFileMatcher.matches()) {
archFound = true;
if (config.validateArchival() && !config.validateClean()) {
break;
}
}
Matcher cleanFileMatcher = CLEAN_FILE_PATTERN.matcher(fileStatus.getPath().getName());
if (cleanFileMatcher.matches()) {
cleanFound = true;
if (!config.validateArchival() && config.validateClean()) {
break;
}
break;
}
if (config.validateClean() && config.validateArchival()) {
if (archFound && cleanFound) {
break;
}
}

String archivalPath = executionContext.getHoodieTestSuiteWriter().getCfg().targetBasePath + "/.hoodie/archived";
metaFileStatuses = fs.listStatus(new Path(archivalPath));
boolean archFound = false;
for (FileStatus fileStatus : metaFileStatuses) {
Matcher archFileMatcher = ARCHIVE_FILE_PATTERN.matcher(fileStatus.getPath().getName());
if (archFileMatcher.matches()) {
archFound = true;
}
}

if (config.validateArchival() && !archFound) {
throw new AssertionError("Archival NotFound in " + metadataPath);
}
@@ -78,6 +78,7 @@
<include>org.apache.hudi:hudi-sync-common</include>
<include>org.apache.hudi:hudi-hadoop-mr</include>
<include>org.apache.hudi:hudi-timeline-service</include>
<include>org.apache.hudi:hudi-aws</include>
<include>org.apache.hudi:hudi-integ-test</include>

<include>org.jetbrains.kotlin:kotlin-stdlib-jdk8</include>

0 comments on commit 52aae36

Please sign in to comment.