Skip to content

Commit

Permalink
#1078 asserting the table directories exists after running the pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
fmendezh committed Sep 12, 2024
1 parent 1f8b957 commit be2309e
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ public void hdfsPipelineTest(String rootTestFolder, InterpretationType.RecordTyp
assertFile(OccurrenceHdfsRecord.class, outputFn.apply(recordType.name().toLowerCase()));
assertFile(MeasurementOrFactTable.class, outputFn.apply("measurementorfacttable"));

assertFileExistFalse(outputFn.apply("extendedmeasurementorfacttable"));
assertFileExistFalse(outputFn.apply("germplasmmeasurementtrialtable"));
assertFileExistFalse(outputFn.apply("permittable"));
assertFileExistFalse(outputFn.apply("loantable"));
assertFileExists(outputFn.apply("extendedmeasurementorfacttable"));
assertFileExists(outputFn.apply("germplasmmeasurementtrialtable"));
assertFileExists(outputFn.apply("permittable"));
assertFileExists(outputFn.apply("loantable"));
}

@Test
Expand Down Expand Up @@ -204,11 +204,11 @@ public void singleHdfsPipelineTest(
+ "_147.avro";

assertFile(OccurrenceHdfsRecord.class, outputFn.apply(recordType.name().toLowerCase()));
assertFileExistFalse(outputFn.apply("measurementorfacttable"));
assertFileExistFalse(outputFn.apply("extendedmeasurementorfacttable"));
assertFileExistFalse(outputFn.apply("germplasmmeasurementtrialtable"));
assertFileExistFalse(outputFn.apply("permittable"));
assertFileExistFalse(outputFn.apply("loantable"));
assertFileExists(outputFn.apply("measurementorfacttable"));
assertFileExists(outputFn.apply("extendedmeasurementorfacttable"));
assertFileExists(outputFn.apply("germplasmmeasurementtrialtable"));
assertFileExists(outputFn.apply("permittable"));
assertFileExists(outputFn.apply("loantable"));
}

@SneakyThrows
Expand Down Expand Up @@ -330,8 +330,8 @@ private void prepareTestData(
}
}

private void assertFileExistFalse(String output) {
Assert.assertFalse(new File(output).exists());
private void assertFileExists(String output) {
Assert.assertTrue(new File(output).exists());
}

private <T extends SpecificRecordBase> void assertFile(Class<T> clazz, String output)
Expand Down

0 comments on commit be2309e

Please sign in to comment.