Skip to content

Commit

Permalink
[JENKINS-20128] reproduced the problem
Browse files Browse the repository at this point in the history
  • Loading branch information
kohsuke committed Nov 9, 2013
1 parent cab3d5d commit 1b6ba71
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions test/src/test/groovy/hudson/cli/CLIActionTest.groovy
@@ -0,0 +1,36 @@
package hudson.cli

import hudson.remoting.Channel
import org.junit.Rule
import org.junit.Test
import org.jvnet.hudson.test.JenkinsRule

import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors

/**
*
*
* @author Kohsuke Kawaguchi
*/
class CLIActionTest {
@Rule
public JenkinsRule j = new JenkinsRule()

ExecutorService pool;

/**
* Makes sure that the /cli endpoint is functioning.
*/
@Test
public void testDuplexHttp() {
pool = Executors.newCachedThreadPool()
try {
FullDuplexHttpStream con = new FullDuplexHttpStream(new URL(j.URL,"cli"));
Channel ch = new Channel("test connection", pool, con.inputStream, con.outputStream);
ch.close();
} finally {
pool.shutdown();
}
}
}

0 comments on commit 1b6ba71

Please sign in to comment.