package org.jenkinsci.plugins.p4; import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWriter; import java.net.ServerSocket; import java.net.Socket; public class DummyServer implements Runnable { private final ServerSocket server; public DummyServer(int port) throws Exception { server = new ServerSocket(port); } public void run() { while (true) { try { Socket socket = server.accept(); OutputStreamWriter osw; osw = new OutputStreamWriter(socket.getOutputStream()); BufferedWriter out = new BufferedWriter(osw); out.write("HTTP/1.0 200 OK\r\n"); out.write("\r\n"); out.close(); socket.close(); } catch (IOException e) { } } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 11628 | Paul Allen | Branching using p4-jenkins-R1.1 | ||
//guest/perforce_software/p4jenkins/main/src/test/java/org/jenkinsci/plugins/p4/DummyServer.java | |||||
#1 | 9690 | Paul Allen |
[Branching using p4-jenkins] Release 1.0.1 |
||
//guest/paul_allen/dev/p4-jenkins/p4-client/src/test/java/org/jenkinsci/plugins/p4/DummyServer.java | |||||
#1 | 9672 | Paul Allen | Refactor name from 'p4_client' to 'p4'. | ||
//guest/paul_allen/dev/p4-jenkins/p4-client/src/test/java/org/jenkinsci/plugins/p4_client/DummyServer.java | |||||
#1 | 9137 | Paul Allen | Functional tests for tabBuild endpoint (submitting Labels) and browser (P4Web/Swarm) dummy http server checks. |