Skip to content
Snippets Groups Projects
Commit 38067aa5 authored by felmer's avatar felmer
Browse files

fixing ServiceFinderTimeoutTest

SVN: 27318
parent ef051b8d
No related branches found
No related tags found
No related merge requests found
...@@ -82,8 +82,10 @@ public class ServiceFinderTimeoutTest extends AssertJUnit ...@@ -82,8 +82,10 @@ public class ServiceFinderTimeoutTest extends AssertJUnit
private AtomicBoolean keepRunning = new AtomicBoolean(true); private AtomicBoolean keepRunning = new AtomicBoolean(true);
public void start() public void start() throws Exception
{ {
serverSocket = new ServerSocket(0);
serverSocket.setSoTimeout(1000);
Runnable serverThread = new Runnable() Runnable serverThread = new Runnable()
{ {
@Override @Override
...@@ -104,9 +106,6 @@ public class ServiceFinderTimeoutTest extends AssertJUnit ...@@ -104,9 +106,6 @@ public class ServiceFinderTimeoutTest extends AssertJUnit
private void runInternal() throws Exception private void runInternal() throws Exception
{ {
serverSocket = new ServerSocket(0);
serverSocket.setSoTimeout(1000);
System.out.println("ServiceFinderTimeoutTest.NotRespondingServer.runInternal() "+serverSocket);
while (keepRunning.get()) while (keepRunning.get())
{ {
...@@ -157,7 +156,7 @@ public class ServiceFinderTimeoutTest extends AssertJUnit ...@@ -157,7 +156,7 @@ public class ServiceFinderTimeoutTest extends AssertJUnit
return serverSocket.getLocalPort(); return serverSocket.getLocalPort();
} }
public static void main(String[] args) public static void main(String[] args) throws Exception
{ {
new NotRespondingServer().start(); new NotRespondingServer().start();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment