Skip to content

Commit

Permalink
Increase retries on all tests and increase timeouts in some UI tests (A…
Browse files Browse the repository at this point in the history
  • Loading branch information
famarting authored and Fabian Martinez committed Oct 23, 2020
1 parent 0a24019 commit 8fe2623
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.time.Duration;
import java.util.List;

import org.junit.jupiter.api.AfterEach;
Expand Down Expand Up @@ -73,7 +74,7 @@ void testDeleteArtifacts(RegistryService service) throws Exception {

page.deleteArtifact(artifactId1);

TestUtils.waitFor("Artifacts list updated", Constants.POLL_INTERVAL, Constants.TIMEOUT_GLOBAL, () -> {
TestUtils.waitFor("Artifacts list updated", Constants.POLL_INTERVAL, Duration.ofSeconds(60).toMillis(), () -> {
try {
return page.getArtifactsList().size() == 1;
} catch (Exception e) {
Expand All @@ -86,7 +87,7 @@ void testDeleteArtifacts(RegistryService service) throws Exception {

page.deleteArtifact(artifactId2);

TestUtils.waitFor("Artifacts list updated", Constants.POLL_INTERVAL, Constants.TIMEOUT_GLOBAL, () -> {
TestUtils.waitFor("Artifacts list updated", Constants.POLL_INTERVAL, Duration.ofSeconds(60).toMillis(), () -> {
try {
return page.getArtifactsList().size() == 0;
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public static void retry(RunnableExc runnable) throws Exception {
}

public static <T> T retry(Callable<T> callable) throws Exception {
return retry(callable, "Action #" + System.currentTimeMillis(), 5);
return retry(callable, "Action #" + System.currentTimeMillis(), 15);
}

public static void retry(RunnableExc runnable, String name, int maxRetries) throws Exception {
Expand Down

0 comments on commit 8fe2623

Please sign in to comment.