New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Managing test flakes #637
Managing test flakes #637
Conversation
@@ -200,6 +201,7 @@ public void testContinuedInterruptionOfClassReferenceCreation(ChannelRunner chan | |||
}); | |||
} | |||
|
|||
@Disabled("TODO first call consistently flakes: Remote call on north failed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -50,6 +51,7 @@ public class ClassRemotingTest { | |||
static final String TESTCALLABLE_TRANSFORMED_CLASSNAME = "hudson.rem0ting.TestCallable"; | |||
static final String TESTLINKAGE_TRANSFORMED_CLASSNAME = "hudson.rem0ting.TestLinkage"; | |||
|
|||
@Disabled("TODO flakes: Artificial testing interrupt.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what is going on with these. Interference from
throw new InterruptedException("Artificial testing interrupt."); |
@@ -36,7 +35,6 @@ | |||
/** | |||
* @author Kohsuke Kawaguchi | |||
*/ | |||
@Ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabled in #387, yet consistently passing for me, and this annotation does not even work since #593, so trying to run it again. Whatever it is that it is testing; from
remoting/src/test/java/hudson/remoting/PrefetchTest.java
Lines 46 to 47 in b5eba82
// TODO: how can I do a meaningful test of this feature? | |
System.out.println(channel.call(vt)); |
|
||
@Ignore("This is not a test just a benchmark and is here for ease of running") | ||
@Disabled("This is not a test just a benchmark and is here for ease of running") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again #593
@@ -114,7 +116,7 @@ public void ready(boolean accept, boolean connect, boolean read, boolean write) | |||
} catch (IOException e) { | |||
// ignore | |||
} | |||
hub.hub().addInterestAccept(key.get()); | |||
h.addInterestAccept(key.get()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to make sure the same hub is being used.
@@ -203,14 +205,16 @@ public void onClosedChannel(ClosedChannelException e) { | |||
} | |||
} | |||
|
|||
@Disabled("TODO flakes: Read timed out; or expected java.net.SocketTimeoutException to be thrown, but nothing was thrown") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Judging by 247f15b this test is just inherently flaky.
java.net.SocketTimeoutException: Read timed out
at java.base/java.net.SocketInputStream.socketRead0(Native Method)
at java.base/java.net.SocketInputStream.socketRead(SocketInputStream.java:115)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.base/java.io.InputStreamReader.read(InputStreamReader.java:181)
at java.base/java.io.Reader.read(Reader.java:229)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1432)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1411)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1208)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1022)
at org.apache.commons.io.IOUtils.toString(IOUtils.java:2839)
at org.jenkinsci.remoting.protocol.IOHubTest.noReadyCallbackIfInterestRemoved(IOHubTest.java:256)
or
java.lang.AssertionError: expected java.net.SocketTimeoutException to be thrown, but nothing was thrown
at org.junit.Assert.assertThrows(Assert.java:1028)
at org.junit.Assert.assertThrows(Assert.java:981)
at org.jenkinsci.remoting.protocol.IOHubTest.noReadyCallbackIfInterestRemoved(IOHubTest.java:267)
@@ -447,7 +448,6 @@ public void socketBasicBackToBackWithAckSSLEngineHeaders() throws Exception { | |||
} | |||
|
|||
@Test | |||
@Repeat(16) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise can get timeouts. Anyway, why did we need to run these 16 times to “prove” that the code was correct?
@@ -750,6 +747,7 @@ public void socketChannelFullProtocolNIO_serverRejects() throws Exception { | |||
assertThat(se.getCause(), instanceOf(ConnectionRefusalException.class)); | |||
} | |||
|
|||
@Disabled("TODO flake: ConnectionRefusal Incorrect acknowledgement received, expected 0x000341436b got 0x0000000000") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exception is expected, but sometimes gets thrown too early (in release
). Not sure what test should be doing.
Some failures observed in CI, but mainly just running
mvn test -DforkCount=.45C
(about five concurrent tests on my machine) over and over. Surprisingly hard to get a clean run; #142 masks poor tests and we do not yet have the infrastructure to track flakes (maybe Launchable could).