Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADM-794:[backend]fix: repair test to add sleep #1018

Merged
merged 8 commits into from
Feb 1, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void ShouldInitializeMetricsDataCompletedInHandlerWithPreOneWhenPreOneExisted()
}

@Test
void ShouldInitializeMetricsDataCompletedInHandlerWhenRequestMetricsExist() {
void ShouldInitializeMetricsDataCompletedInHandlerWhenRequestMetricsExist() throws InterruptedException {
MetricsDataCompleted expectMetricsDataResult = MetricsDataCompleted.builder()
.boardMetricsCompleted(false)
.pipelineMetricsCompleted(true)
Expand All @@ -124,6 +124,7 @@ void ShouldInitializeMetricsDataCompletedInHandlerWhenRequestMetricsExist() {
.thenReturn(MetricsDataCompleted.builder().pipelineMetricsCompleted(true).build());
doAnswer(invocation -> null).when(generateReporterService).generateBoardReport(request);

Thread.sleep(100);
reportService.generateReportByType(request, MetricType.BOARD);

verify(asyncMetricsDataHandler).putMetricsDataCompleted("csvTimeStamp", expectMetricsDataResult);
Expand Down
Loading