This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push: new 9959b6e Attempt to address intermittent CI failures 9959b6e is described below commit 9959b6e57f704aebabdce42009423d2bc4ee145a Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Apr 14 20:19:20 2020 +0100 Attempt to address intermittent CI failures --- .../tribes/group/interceptors/TestTcpFailureDetector.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/org/apache/catalina/tribes/group/interceptors/TestTcpFailureDetector.java b/test/org/apache/catalina/tribes/group/interceptors/TestTcpFailureDetector.java index 76b13bd..93d3e96 100644 --- a/test/org/apache/catalina/tribes/group/interceptors/TestTcpFailureDetector.java +++ b/test/org/apache/catalina/tribes/group/interceptors/TestTcpFailureDetector.java @@ -73,7 +73,16 @@ public class TestTcpFailureDetector { channel2.stop(Channel.SND_RX_SEQ); ByteMessage msg = new ByteMessage(new byte[1024]); try { - channel1.send(channel1.getMembers(), msg, 0); + int msgCount = 0; + // Normally the first message sent should fail but occasional + // failures are observed on CI systems so messages are sent in a + // loop with a delay between them to try and account for timing + // differences. + while (msgCount < 5) { + channel1.send(channel1.getMembers(), msg, 0); + msgCount++; + Thread.sleep(500); + } Assert.fail("Message send should have failed."); } catch ( ChannelException x ) { // Ignore --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org