Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Improve waiting strategy for Integration tests - cont #409

Merged
merged 3 commits into from
Jun 8, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

public class RetryExecutorService<T> implements AutoCloseable {

private static final int MAX_RETRY_TIME = 2 * 60 * 1000; // 2 minutes

public static final int RETRY_DELAY = 5 * 1000; // 5 seconds

private final ScheduledExecutorService scheduledExecutor;

public RetryExecutorService() {
Expand All @@ -24,7 +28,7 @@ public RetryExecutorService() {
*/
public T submitWithRetry(Callable<T> task) {
// @formatter:off
return submitWithRetry(task, () -> {}, () -> {}, 2 * 60 * 1000, 5000);
return submitWithRetry(task, () -> {}, () -> {}, MAX_RETRY_TIME, RETRY_DELAY);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this (and the commit message ;) )

// @formatter:on
}

Expand Down