Skip to content

Commit

Permalink
Merge pull request #2753 from jglick/Security232Test
Browse files Browse the repository at this point in the history
Security232Test seems flaky
  • Loading branch information
jglick committed Feb 17, 2017
2 parents dc7b702 + 88cd913 commit 83232e6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/src/test/java/jenkins/security/Security232Test.java
Expand Up @@ -19,6 +19,7 @@
import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketException;
import java.net.URL;
import java.net.URLClassLoader;
import java.rmi.activation.ActivationDesc;
Expand All @@ -34,6 +35,7 @@
import jenkins.security.security218.ysoserial.payloads.CommonsCollections1;
import jenkins.security.security218.ysoserial.payloads.ObjectPayload;
import static org.junit.Assert.*;
import org.junit.Assume;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.Issue;
Expand Down Expand Up @@ -82,7 +84,11 @@ public void commonsCollections1() throws Exception {
dos.writeUTF("Protocol:CLI-connect");

ExecutorService cp = Executors.newCachedThreadPool();
c = new ChannelBuilder("EXPLOIT", cp).withMode(Mode.BINARY).build(s.getInputStream(), outputStream);
try {
c = new ChannelBuilder("EXPLOIT", cp).withMode(Mode.BINARY).build(s.getInputStream(), outputStream);
} catch (SocketException x) {
Assume.assumeNoException("failed to connect to CLI", x);
}

System.err.println("* Channel open");

Expand Down

0 comments on commit 83232e6

Please sign in to comment.