Skip to content
Permalink
Browse files

Better thread termination

  • Loading branch information...
pabender committed May 27, 2019
1 parent 630f82d commit 50a933c2f37629ba29152e8c420a611bf81eebd3
Showing with 6 additions and 2 deletions.
  1. +6 −2 java/test/jmri/jmrix/roco/z21/simulator/Z21SimulatorAdapterTest.java
@@ -85,7 +85,6 @@ public void testConnection() {
} catch(java.net.SocketException se) {
Assert.fail("Failure Creating Socket");
}
a.getSystemConnectionMemo().getTrafficController().terminateThreads();
}

@Test
@@ -152,7 +151,6 @@ public void testAddressedProgrammerManager() {
// and configure/start the simulator.
a.configure();
Assert.assertTrue(a.getSystemConnectionMemo().provides(jmri.AddressedProgrammerManager.class));
a.getSystemConnectionMemo().getTrafficController().terminateThreads();
}

// verify there is a Reporter manager
@@ -179,6 +177,12 @@ public void setUp() {

@After
public void tearDown() {
if(a.getSystemConnectionMemo() != null ) {
if( a.getSystemConnectionMemo().getTrafficController() != null ) {
a.getSystemConnectionMemo().getTrafficController().terminateThreads();
}
a.getSystemConnectionMemo().dispose();
}
a.terminateThread();
// suppress two timeout messages that occur
JUnitAppender.suppressMessageStartsWith(org.apache.log4j.Level.WARN,"Timeout on reply to message:");

0 comments on commit 50a933c

Please sign in to comment.
You can’t perform that action at this time.