Skip to content

Commit

Permalink
fix(cli): repeate flaky tests FileChangedEventListenerTest
Browse files Browse the repository at this point in the history
This is inherently racy as it's async and watch the filesystem which cannot be done reliabily.
  • Loading branch information
loicmathieu committed Jan 30, 2025
1 parent a921b95 commit c792d9b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import jakarta.inject.Inject;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.*;
import org.junitpioneer.jupiter.RetryingTest;

import java.io.IOException;
import java.nio.file.Files;
Expand Down Expand Up @@ -54,7 +55,7 @@ void beforeEach() throws Exception {
}
}

@Test
@RetryingTest(5) // Flaky on CI but always pass locally
void test() throws IOException, TimeoutException {
// remove the flow if it already exists
flowRepository.findByIdWithSource(null, "io.kestra.tests.watch", "myflow").ifPresent(flow -> flowRepository.delete(flow));
Expand Down Expand Up @@ -89,7 +90,7 @@ void test() throws IOException, TimeoutException {
);
}

@Test
@RetryingTest(5) // Flaky on CI but always pass locally
void testWithPluginDefault() throws IOException, TimeoutException {
// remove the flow if it already exists
flowRepository.findByIdWithSource(null, "io.kestra.tests.watch", "pluginDefault").ifPresent(flow -> flowRepository.delete(flow));
Expand Down

0 comments on commit c792d9b

Please sign in to comment.