Skip to content

Commit

Permalink
Fixing integ test suite for hudi-aws and archival validation
Browse files Browse the repository at this point in the history
  • Loading branch information
nsivabalan committed Nov 28, 2021
1 parent eca1693 commit 6f9a5e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions packaging/hudi-integ-test-bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 6f9a5e8

Please sign in to comment.