Merge branch '6.1.x'
This commit is contained in:
@@ -57,7 +57,7 @@ class SimpleThreadScopeTests {
|
||||
thread2.start();
|
||||
// Assert
|
||||
Awaitility.await()
|
||||
.atMost(500, TimeUnit.MILLISECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.until(() -> (beans[0] != null) && (beans[1] != null));
|
||||
assertThat(beans[1]).isNotSameAs(beans[0]);
|
||||
|
||||
@@ -339,7 +339,7 @@ class AsyncExecutionTests {
|
||||
context.refresh();
|
||||
// Assert
|
||||
Awaitility.await()
|
||||
.atMost(1, TimeUnit.SECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.until(() -> listenerCalled == 1);
|
||||
context.close();
|
||||
@@ -357,7 +357,7 @@ class AsyncExecutionTests {
|
||||
context.close();
|
||||
// Assert
|
||||
Awaitility.await()
|
||||
.atMost(1, TimeUnit.SECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.until(() -> listenerCalled == 2);
|
||||
assertThat(listenerConstructed).isEqualTo(1);
|
||||
@@ -377,7 +377,7 @@ class AsyncExecutionTests {
|
||||
context.close();
|
||||
// Assert
|
||||
Awaitility.await()
|
||||
.atMost(1, TimeUnit.SECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.until(() -> listenerCalled == 2);
|
||||
assertThat(listenerConstructed).isEqualTo(2);
|
||||
|
||||
@@ -226,7 +226,7 @@ class EnableAsyncTests {
|
||||
asyncBean.work();
|
||||
// Assert
|
||||
Awaitility.await()
|
||||
.atMost(500, TimeUnit.MILLISECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.until(() -> asyncBean.getThreadOfExecution() != null);
|
||||
assertThat(asyncBean.getThreadOfExecution().getName()).startsWith("Custom-");
|
||||
@@ -244,7 +244,7 @@ class EnableAsyncTests {
|
||||
asyncBean.work();
|
||||
// Assert
|
||||
Awaitility.await()
|
||||
.atMost(500, TimeUnit.MILLISECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.until(() -> asyncBean.getThreadOfExecution() != null);
|
||||
assertThat(asyncBean.getThreadOfExecution().getName()).startsWith("Custom-");
|
||||
@@ -266,7 +266,7 @@ class EnableAsyncTests {
|
||||
asyncBean.fail();
|
||||
// Assert
|
||||
Awaitility.await()
|
||||
.atMost(500, TimeUnit.MILLISECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.untilAsserted(() -> exceptionHandler.assertCalledWith(method, UnsupportedOperationException.class));
|
||||
ctx.close();
|
||||
@@ -283,7 +283,7 @@ class EnableAsyncTests {
|
||||
asyncBean.work();
|
||||
// Assert
|
||||
Awaitility.await()
|
||||
.atMost(500, TimeUnit.MILLISECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.until(() -> asyncBean.getThreadOfExecution() != null);
|
||||
assertThat(asyncBean.getThreadOfExecution().getName()).startsWith("Post-");
|
||||
@@ -305,7 +305,7 @@ class EnableAsyncTests {
|
||||
asyncBean.fail();
|
||||
// Assert
|
||||
Awaitility.await()
|
||||
.atMost(500, TimeUnit.MILLISECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.untilAsserted(() -> exceptionHandler.assertCalledWith(method, UnsupportedOperationException.class));
|
||||
ctx.close();
|
||||
@@ -320,7 +320,7 @@ class EnableAsyncTests {
|
||||
asyncBean.work();
|
||||
// Assert
|
||||
Awaitility.await()
|
||||
.atMost(500, TimeUnit.MILLISECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.until(() -> asyncBean.getThreadOfExecution() != null);
|
||||
assertThat(asyncBean.getThreadOfExecution().getName()).startsWith("Custom-");
|
||||
@@ -336,7 +336,7 @@ class EnableAsyncTests {
|
||||
asyncBean.work();
|
||||
// Assert
|
||||
Awaitility.await()
|
||||
.atMost(500, TimeUnit.MILLISECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.until(() -> asyncBean.getThreadOfExecution() != null);
|
||||
assertThat(asyncBean.getThreadOfExecution().getName()).startsWith("Custom-");
|
||||
|
||||
@@ -89,7 +89,7 @@ abstract class AbstractSchedulingTaskExecutorTests {
|
||||
executor.execute(task);
|
||||
Awaitility.await()
|
||||
.dontCatchUncaughtExceptions()
|
||||
.atMost(1, TimeUnit.SECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.until(() -> task.exception.get() != null && task.exception.get().getMessage().equals(
|
||||
"TestTask failure for test 'executeFailingRunnable': expectedRunCount:<0>, actualRunCount:<1>"));
|
||||
@@ -133,7 +133,7 @@ abstract class AbstractSchedulingTaskExecutorTests {
|
||||
future.addCallback(result -> outcome = result, ex -> outcome = ex);
|
||||
// Assert
|
||||
Awaitility.await()
|
||||
.atMost(1, TimeUnit.SECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.until(future::isDone);
|
||||
assertThat(outcome).isNull();
|
||||
@@ -148,7 +148,7 @@ abstract class AbstractSchedulingTaskExecutorTests {
|
||||
future.whenComplete(this::storeOutcome);
|
||||
// Assert
|
||||
Awaitility.await()
|
||||
.atMost(1, TimeUnit.SECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.until(future::isDone);
|
||||
assertThat(outcome).isNull();
|
||||
@@ -164,7 +164,7 @@ abstract class AbstractSchedulingTaskExecutorTests {
|
||||
|
||||
Awaitility.await()
|
||||
.dontCatchUncaughtExceptions()
|
||||
.atMost(1, TimeUnit.SECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.until(() -> future.isDone() && outcome != null);
|
||||
assertThat(outcome.getClass()).isSameAs(RuntimeException.class);
|
||||
@@ -178,7 +178,7 @@ abstract class AbstractSchedulingTaskExecutorTests {
|
||||
|
||||
Awaitility.await()
|
||||
.dontCatchUncaughtExceptions()
|
||||
.atMost(1, TimeUnit.SECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.until(() -> future.isDone() && outcome != null);
|
||||
assertThat(outcome.getClass()).isSameAs(CompletionException.class);
|
||||
@@ -198,7 +198,7 @@ abstract class AbstractSchedulingTaskExecutorTests {
|
||||
// ignore
|
||||
}
|
||||
Awaitility.await()
|
||||
.atMost(4, TimeUnit.SECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.untilAsserted(() -> assertThatExceptionOfType(CancellationException.class)
|
||||
.isThrownBy(() -> future2.get(1000, TimeUnit.MILLISECONDS)));
|
||||
@@ -217,7 +217,7 @@ abstract class AbstractSchedulingTaskExecutorTests {
|
||||
// ignore
|
||||
}
|
||||
Awaitility.await()
|
||||
.atMost(4, TimeUnit.SECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.untilAsserted(() -> assertThatExceptionOfType(TimeoutException.class)
|
||||
.isThrownBy(() -> future2.get(1000, TimeUnit.MILLISECONDS)));
|
||||
@@ -253,7 +253,7 @@ abstract class AbstractSchedulingTaskExecutorTests {
|
||||
// ignore
|
||||
}
|
||||
Awaitility.await()
|
||||
.atMost(4, TimeUnit.SECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.untilAsserted(() -> assertThatExceptionOfType(CancellationException.class)
|
||||
.isThrownBy(() -> future2.get(1000, TimeUnit.MILLISECONDS)));
|
||||
@@ -268,7 +268,7 @@ abstract class AbstractSchedulingTaskExecutorTests {
|
||||
future.addCallback(result -> outcome = result, ex -> outcome = ex);
|
||||
// Assert
|
||||
Awaitility.await()
|
||||
.atMost(1, TimeUnit.SECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.until(() -> future.isDone() && outcome != null);
|
||||
assertThat(outcome.toString().substring(0, this.threadNamePrefix.length())).isEqualTo(this.threadNamePrefix);
|
||||
@@ -284,7 +284,7 @@ abstract class AbstractSchedulingTaskExecutorTests {
|
||||
// Assert
|
||||
Awaitility.await()
|
||||
.dontCatchUncaughtExceptions()
|
||||
.atMost(1, TimeUnit.SECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.until(() -> future.isDone() && outcome != null);
|
||||
assertThat(outcome.getClass()).isSameAs(RuntimeException.class);
|
||||
@@ -310,7 +310,7 @@ abstract class AbstractSchedulingTaskExecutorTests {
|
||||
future.whenComplete(this::storeOutcome);
|
||||
// Assert
|
||||
Awaitility.await()
|
||||
.atMost(1, TimeUnit.SECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.until(() -> future.isDone() && outcome != null);
|
||||
assertThat(outcome.toString().substring(0, this.threadNamePrefix.length())).isEqualTo(this.threadNamePrefix);
|
||||
@@ -325,7 +325,7 @@ abstract class AbstractSchedulingTaskExecutorTests {
|
||||
// Assert
|
||||
Awaitility.await()
|
||||
.dontCatchUncaughtExceptions()
|
||||
.atMost(1, TimeUnit.SECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.pollInterval(10, TimeUnit.MILLISECONDS)
|
||||
.until(() -> future.isDone() && outcome != null);
|
||||
assertThat(outcome.getClass()).isSameAs(CompletionException.class);
|
||||
|
||||
Reference in New Issue
Block a user