A modest test case for the change

This commit is contained in:
Kohsuke Kawaguchi committed 2015-11-07 11:10:09 -08:00
1 parent 2f617144e9
commit 12a970dffa
2 files changed
+23

No files matched your search

@@ -2,6 +2,7 @@ package hudson.cli;
import hudson.remoting.FastPipedInputStream;
import hudson.remoting.FastPipedOutputStream;
import org.codehaus.groovy.runtime.Security218;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -69,4 +70,15 @@ public class ConnectionTest extends Assert {
throw new Error("thread is still alive");
}
}
@Test
public void testSecurity218() throws Exception {
c1.writeObject(new Security218());
try {
c2.readObject();
fail();
} catch (SecurityException e) {
assertTrue(e.getMessage().contains(Security218.class.getName()));
}
}
}
@@ -0,0 +1,11 @@
package org.codehaus.groovy.runtime;
import java.io.Serializable;
/**
* Test payload.
*
* @author Kohsuke Kawaguchi
*/
public class Security218 implements Serializable {
}