Skip to content

Commit

Permalink
[FLINK-30257] fix SqlClientITCase#testMatchRecognize
Browse files Browse the repository at this point in the history
  • Loading branch information
WencongLiu committed Jan 17, 2023
1 parent ae8de97 commit f981dd0
Showing 1 changed file with 9 additions and 4 deletions.
Expand Up @@ -290,10 +290,15 @@ private void verifyNumberOfResultRecords(String resultFilePath, int expectedNumb
File tempOutputFile = new File(tempDir, "records.out");
String tempOutputFilepath = tempOutputFile.toString();
GenericContainer<?> taskManager = flink.getTaskManagers().get(0);
Thread.sleep(5000); // prevent NotFoundException: Status 404
taskManager.copyFileFromContainer(resultFilePath, tempOutputFilepath);

int numberOfResultRecords = UpsertTestFileUtil.getNumberOfRecords(tempOutputFile);
int numberOfResultRecords;
while (true) {
Thread.sleep(5000); // prevent NotFoundException: Status 404
taskManager.copyFileFromContainer(resultFilePath, tempOutputFilepath);
numberOfResultRecords = UpsertTestFileUtil.getNumberOfRecords(tempOutputFile);
if (numberOfResultRecords == expectedNumberOfRecords) {
break;
}
}
assertThat(numberOfResultRecords).isEqualTo(expectedNumberOfRecords);
}

Expand Down

0 comments on commit f981dd0

Please sign in to comment.