Skip to content

Commit

Permalink
Fix mistaken service class and simplify assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanSkraba authored and snuyanzin committed Aug 30, 2024
1 parent cb98c7b commit 03ce0de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@
# limitations under the License.

org.apache.flink.util.TestLoggerExtension
org.junit.jupiter.api.extension.Extension
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ void testCsvFormatStatsReportWithSingleFile() throws Exception {
// insert data and get statistics.
DataType dataType = tEnv.from("sourceTable").getResolvedSchema().toPhysicalRowDataType();
tEnv.fromValues(dataType, getData()).executeInsert("sourceTable").await();
assertThat(folder.listFiles()).isNotNull().hasSize(1);
assertThat(folder.listFiles()).hasSize(1);
File[] files = folder.listFiles();
assert files != null;
assertThat(files).isNotNull();
TableStats tableStats =
csvBulkDecodingFormat.reportStatistics(
Collections.singletonList(new Path(files[0].toURI().toString())), null);
Expand All @@ -81,10 +81,10 @@ void testCsvFormatStatsReportWithMultiFile() throws Exception {
DataType dataType = tEnv.from("sourceTable").getResolvedSchema().toPhysicalRowDataType();
tEnv.fromValues(dataType, getData()).executeInsert("sourceTable").await();
tEnv.fromValues(dataType, getData()).executeInsert("sourceTable").await();
assertThat(folder.listFiles()).isNotNull().hasSize(2);
assertThat(folder.listFiles()).hasSize(2);
File[] files = folder.listFiles();
List<Path> paths = new ArrayList<>();
assert files != null;
assertThat(files).isNotNull();
paths.add(new Path(files[0].toURI().toString()));
paths.add(new Path(files[1].toURI().toString()));
TableStats tableStats = csvBulkDecodingFormat.reportStatistics(paths, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ public void testOrcFormatStatsReportWithSingleFile() throws Exception {
// insert data and get statistics.
DataType dataType = tEnv.from("sourceTable").getResolvedSchema().toPhysicalRowDataType();
tEnv.fromValues(dataType, getData()).executeInsert("sourceTable").await();
assertThat(folder.listFiles()).isNotNull().hasSize(1);
assertThat(folder.listFiles()).hasSize(1);
File[] files = folder.listFiles();
assert files != null;
assertThat(files).isNotNull();
TableStats tableStats =
orcBulkDecodingFormat.reportStatistics(
Collections.singletonList(new Path(files[0].toURI().toString())), dataType);
Expand Down

0 comments on commit 03ce0de

Please sign in to comment.