Skip to content

Commit

Permalink
Need to use @Ignore on JUnit 4, @Disabled on 5 (#679)
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick authored Oct 13, 2023
1 parent f9be96b commit 3b293d5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/main/java/hudson/remoting/ObjectInputStreamEx.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class ObjectInputStreamEx extends ObjectInputStream {
/**
* @deprecated as of 2.53
*/
@Deprecated
public ObjectInputStreamEx(InputStream in, ClassLoader cl) throws IOException {
this(in,cl,ClassFilter.DEFAULT);
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/hudson/remoting/RegExpBenchmark.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.regex.Pattern;
import org.junit.jupiter.api.Disabled;
import org.junit.Ignore;

@Disabled("This is not a test just a benchmark and is here for ease of running")
@Ignore("This is not a test just a benchmark and is here for ease of running")
public class RegExpBenchmark {

final Pattern p1 = Pattern.compile("^org\\.codehaus\\.groovy\\.runtime\\..*");
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/jenkinsci/remoting/protocol/IOHubTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
import static org.hamcrest.Matchers.nullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertThrows;
import org.junit.jupiter.api.Disabled;
import org.junit.Ignore;

public class IOHubTest {

Expand Down Expand Up @@ -205,7 +205,7 @@ public void onClosedChannel(ClosedChannelException e) {
}
}

@Disabled("TODO flakes: Read timed out; or expected java.net.SocketTimeoutException to be thrown, but nothing was thrown")
@Ignore("TODO flakes: Read timed out; or expected java.net.SocketTimeoutException to be thrown, but nothing was thrown")
@Test
public void noReadyCallbackIfInterestRemoved() throws Exception {
final ServerSocketChannel srv = ServerSocketChannel.open();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
import static org.hamcrest.Matchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertThrows;
import org.junit.jupiter.api.Disabled;
import org.junit.Ignore;

public class ProtocolStackImplTest {

Expand Down Expand Up @@ -747,7 +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")
@Ignore("TODO flake: ConnectionRefusal Incorrect acknowledgement received, expected 0x000341436b got 0x0000000000")
@Test
@Repeat(16)
public void pipeChannelFullProtocolNIO_invalidAck() throws Exception {
Expand Down Expand Up @@ -794,7 +794,7 @@ public void pipeChannelFullProtocolNIO_invalidAck() throws Exception {
ClosedChannelException.class)));
}

@Disabled("TODO flake: ConnectionRefusalException: Incorrect acknowledgement received, expected 0x000341436b got 0x0000000000")
@Ignore("TODO flake: ConnectionRefusalException: Incorrect acknowledgement received, expected 0x000341436b got 0x0000000000")
@Test
@Repeat(16)
public void socketChannelFullProtocolNIO_invalidAck() throws Exception {
Expand Down

0 comments on commit 3b293d5

Please sign in to comment.