You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2020/07/03 02:04:01 UTC
[james-project] 06/15: JAMES-3289 fix flacky tests
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 0345c32c2e7f56dcada0a378221a935a4c904ec7
Author: RĂ©mi Kowalski <rk...@linagora.com>
AuthorDate: Tue Jun 30 10:23:41 2020 +0200
JAMES-3289 fix flacky tests
add a delay in the throwing behavior to avoid the reactor bug defined in https://github.com/reactor/reactor-core/issues/1941
it is the source of instability in our tests, as in the case of a first failing first publisher in a merge operation,
its error would not be propagated and the result of the merge will be a successful Publisher instead of the expected failing one.
---
.../test/java/org/apache/james/backends/cassandra/Scenario.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/Scenario.java b/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/Scenario.java
index 9acabc2..f5ddbf7 100644
--- a/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/Scenario.java
+++ b/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/Scenario.java
@@ -41,6 +41,14 @@ public class Scenario {
@FunctionalInterface
interface Behavior {
Behavior THROW = (session, statement) -> {
+ //JAMES-3289 add a delay in the throwing behavior to avoid the reactor bug defined in https://github.com/reactor/reactor-core/issues/1941
+ //which cause flacky tests.
+ //once this bug is solved this delay could be removed.
+ try {
+ Thread.sleep(50);
+ } catch (InterruptedException e) {
+ //DO NOTHING
+ }
throw new InjectedFailureException();
};
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org