Skip to content

Commit

Permalink
Restore test-timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
kagkarlsson committed May 23, 2020
1 parent c46e4ae commit 81e9120
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class ClusterTest {

@Test
public void test_concurrency() throws InterruptedException {
Assertions.assertTimeoutPreemptively(Duration.ofSeconds(20), () -> {
Assertions.assertTimeoutPreemptively(Duration.ofSeconds(10), () -> {

final List<String> ids = IntStream.range(1, 1001).mapToObj(String::valueOf).collect(toList());

Expand Down Expand Up @@ -75,7 +75,7 @@ public void test_concurrency() throws InterruptedException {

@Test
public void test_concurrency_recurring() throws InterruptedException {
Assertions.assertTimeoutPreemptively(Duration.ofSeconds(20), () -> {
Assertions.assertTimeoutPreemptively(Duration.ofSeconds(10), () -> {

final RecurringTask<Void> task1 = Tasks.recurring("task1", Schedules.fixedDelay(Duration.ofMillis(0)))
.execute((taskInstance, executionContext) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class DeadExecutionTest {

@Test
public void test_dead_execution() {
Assertions.assertTimeoutPreemptively(Duration.ofSeconds(20), () -> {
Assertions.assertTimeoutPreemptively(Duration.ofSeconds(5), () -> {
CustomTask<Void> customTask = Tasks.custom("custom-a", Void.class)
.execute((taskInstance, executionContext) -> new CompletionHandler<Void>() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void test_execute_until_none_left_high_volume() {


private void testExecuteUntilNoneLeft(int pollingLimit, int threads, int executionsToRun) {
Assertions.assertTimeoutPreemptively(Duration.ofSeconds(20), () -> {
Assertions.assertTimeoutPreemptively(Duration.ofSeconds(5), () -> {

Instant now = Instant.now();
OneTimeTask<Void> task = TestTasks.oneTime("onetime-a", Void.class, TestTasks.DO_NOTHING);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void setUp() {

@Test
public void test_immediate_execution() {
Assertions.assertTimeoutPreemptively(Duration.ofSeconds(20), () -> {
Assertions.assertTimeoutPreemptively(Duration.ofSeconds(10), () -> {

Instant now = Instant.now();
OneTimeTask<Void> task = TestTasks.oneTime("onetime-a", Void.class, TestTasks.DO_NOTHING);
Expand Down

0 comments on commit 81e9120

Please sign in to comment.