Skip to content
Permalink
Browse files

alpha sort profile tests in app test, adjust MAXTIME,

remove PreventInitLoop test from all but PanelProTest (concerns a Panel,
takes time, no added value to repeat), fix GrapeVine node init, imports
  • Loading branch information...
silverailscolo committed Jun 2, 2019
1 parent 4e36ef2 commit 636cbc2c94418849c9e09ab2c1f4ab6a07c4febf
@@ -2,6 +2,8 @@

import java.io.IOException;

import jmri.util.JUnitAppender;

import org.junit.Ignore;
import org.junit.Test;

@@ -25,40 +27,35 @@ protected void launch(String[] args) {
DecoderPro.main(args);
}

@Test
public void testLaunchLocoNet() throws IOException {
runOne("LocoNet_Simulator", "DecoderPro", "DecoderPro version"); // param 2 and 3 must match Console output
jmri.util.JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnPowerManager LnTrackStatusUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
jmri.util.JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnSensorUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
jmri.util.JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnSensorUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
}

@Test
public void testLaunchEasyDcc() throws IOException {
runOne("EasyDcc_Simulator", "DecoderPro", "DecoderPro version");
// param 1 is profile folder name, param 2 and 3 must match Console output
}

@Test
public void testLaunchSprog() throws IOException {
runOne("Sprog_Simulator", "DecoderPro", "DecoderPro version");
public void testLaunchGrapevine() throws IOException {
runOne("Grapevine_Simulator", "DecoderPro", "DecoderPro version");
JUnitAppender.suppressWarnMessage("Timeout can't be handled due to missing node (index 1)");
JUnitAppender.suppressWarnMessage("Timeout can't be handled due to missing node (index 0)");
}

@Test
public void testLaunchGrapevine() throws IOException {
runOne("Grapevine_Simulator", "DecoderPro", "DecoderPro version");
public void testLaunchLocoNet() throws IOException {
runOne("LocoNet_Simulator", "DecoderPro", "DecoderPro version");
JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnPowerManager LnTrackStatusUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnSensorUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnSensorUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
}

@Test
public void testLaunchTmcc() throws IOException {
runOne("TMCC_Simulator", "DecoderPro", "DecoderPro version");
public void testLaunchSprog() throws IOException {
runOne("Sprog_Simulator", "DecoderPro", "DecoderPro version");
}

@Test
public void testLaunchInitLoop() throws IOException {
runOne("Prevent_Init_Loop", "DecoderPro", "DecoderPro version");
jmri.util.JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnPowerManager LnTrackStatusUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
jmri.util.JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnSensorUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
jmri.util.JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnSensorUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
public void testLaunchTmcc() throws IOException {
runOne("TMCC_Simulator", "DecoderPro", "DecoderPro version");
}

}
@@ -2,6 +2,8 @@

import java.io.IOException;

import jmri.util.JUnitAppender;

import org.junit.Ignore;
import org.junit.Test;

@@ -24,36 +26,37 @@
protected void launch(String[] args) {
DispatcherPro.main(args);
}

@Test
public void testLaunchLocoNet() throws IOException {
runOne("LocoNet_Simulator", "DispatcherPro", "DispatcherPro version"); // param 2 and 3 must match Console output
}

@Test
public void testLaunchEasyDcc() throws IOException {
runOne("EasyDcc_Simulator", "DispatcherPro", "DispatcherPro version");
// param 1 is profile folder name, param 2 and 3 must match Console output
}

@Test
public void testLaunchGrapevine() throws IOException {
runOne("Grapevine_Simulator", "DispatcherPro", "DispatcherPro version");
jmri.util.JUnitAppender.suppressWarnMessage("Timeout can't be handled due to missing node (index 1)");
jmri.util.JUnitAppender.suppressWarnMessage("Timeout can't be handled due to missing node (index 0)");
JUnitAppender.suppressWarnMessage("Timeout can't be handled due to missing node (index 1)");
JUnitAppender.suppressWarnMessage("Timeout can't be handled due to missing node (index 0)");
}

@Test
public void testLaunchTmcc() throws IOException {
runOne("TMCC_Simulator", "DispatcherPro", "DispatcherPro version");
public void testLaunchLocoNet() throws IOException {
runOne("LocoNet_Simulator", "DispatcherPro", "DispatcherPro version");
JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnPowerManager LnTrackStatusUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnSensorUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnSensorUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");

}

@Test
public void testLaunchSprog() throws IOException {
runOne("Sprog_Simulator", "PanelPro", "PanelPro version");
runOne("Sprog_Simulator", "DispatcherPro", "DispatcherPro version");
}

@Test
public void testLaunchInitLoop() throws IOException {
runOne("Prevent_Init_Loop", "DispatcherPro", "DispatcherPro version");
public void testLaunchTmcc() throws IOException {
runOne("TMCC_Simulator", "DispatcherPro", "DispatcherPro version");
}

}
@@ -46,7 +46,7 @@
/**
* Run one application.
*
* @param profileName Name of the Profile to copy from files in
* @param profileName Name of the Profile folder to copy from files in
* java/test/apps/PanelPro/profiles/
* @param frameName Application (frame) title
* @param startMessageStart Start of the "we're up!" message as seen in System Console
@@ -55,7 +55,6 @@ protected void runOne(String profileName, String frameName, String startMessageS
Assume.assumeFalse(GraphicsEnvironment.isHeadless());

try {
// JUnitUtil.resetInstanceManager(); // reset between calls
// create a custom profile
folder.create();
File tempFolder = folder.newFolder();
@@ -32,33 +32,37 @@ protected void extraChecks() {
JUnitUtil.waitFor(()->{return JUnitAppender.checkForMessageStartingWith("Main initialization done") != null;}, "last Info line seen");
}

@Test
public void testLaunchLocoNet() throws IOException {
runOne("LocoNet_Simulator", "PanelPro", "PanelPro version"); // param 2 and 3 must match Console output
}

@Test
public void testLaunchEasyDcc() throws IOException {
runOne("EasyDcc_Simulator", "PanelPro", "PanelPro version");
// param 1 is profile folder name, param 2 and 3 must match Console output
}

@Test
public void testLaunchGrapevine() throws IOException {
runOne("Grapevine_Simulator", "PanelPro", "PanelPro version");
jmri.util.JUnitAppender.suppressWarnMessage("Timeout can't be handled due to missing node (index 1)");
jmri.util.JUnitAppender.suppressWarnMessage("Timeout can't be handled due to missing node (index 0)");
JUnitAppender.suppressWarnMessage("Timeout can't be handled due to missing node (index 1)");
JUnitAppender.suppressWarnMessage("Timeout can't be handled due to missing node (index 0)");
}

@Test
public void testLaunchTmcc() throws IOException {
runOne("TMCC_Simulator", "PanelPro", "PanelPro version");
public void testLaunchLocoNet() throws IOException {
runOne("LocoNet_Simulator", "PanelPro", "PanelPro version");
JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnPowerManager LnTrackStatusUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnSensorUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnSensorUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
}

@Test
public void testLaunchSprog() throws IOException {
runOne("Sprog_Simulator", "PanelPro", "PanelPro version");
}

@Test
public void testLaunchTmcc() throws IOException {
runOne("TMCC_Simulator", "PanelPro", "PanelPro version");
}

@Test
public void testLaunchInitLoop() throws IOException {
runOne("Prevent_Init_Loop", "PanelPro", "PanelPro version");
@@ -10,4 +10,6 @@
</options>
</connection>
</connections>
<startup xmlns="http://jmri.org/xml/schema/auxiliary-configuration/startup-4-3-5.xsd">
</startup>
</auxiliary-configuration>
@@ -10,4 +10,6 @@
</options>
</connection>
</connections>
<startup xmlns="http://jmri.org/xml/schema/auxiliary-configuration/startup-4-3-5.xsd">
</startup>
</auxiliary-configuration>
@@ -46,5 +46,5 @@ jmri-web-server.disallowedFrames.5=Change Signal Head Icons
jmri-web-server.disallowedFrames.6=Item Palette
jmri-web-server.port=12080
jmri-web-server.railroadName=Test Ops Entry
profile.id=grapevinesim.3f339028
profile.name=grapevinesim
profile.id=Grapevine_Simulator.3f339028
profile.name=Grapevine Simulator
@@ -5,7 +5,7 @@
<options>
<option>
<name>InitPreference</name>
<value>Disabled</value>
<value>First 4 per bank</value>
</option>
</options>
<node name="1">
@@ -16,5 +16,6 @@
</node>
</connection>
</connections>
<startup xmlns="http://jmri.org/xml/schema/auxiliary-configuration/startup-4-3-5.xsd"/>
<startup xmlns="http://jmri.org/xml/schema/auxiliary-configuration/startup-4-3-5.xsd">
</startup>
</auxiliary-configuration>
@@ -16,5 +16,6 @@
</node>
</connection>
</connections>
<startup xmlns="http://jmri.org/xml/schema/auxiliary-configuration/startup-4-3-5.xsd"/>
<startup xmlns="http://jmri.org/xml/schema/auxiliary-configuration/startup-4-3-5.xsd">
</startup>
</auxiliary-configuration>
@@ -10,4 +10,6 @@
</options>
</connection>
</connections>
<startup xmlns="http://jmri.org/xml/schema/auxiliary-configuration/startup-4-3-5.xsd">
</startup>
</auxiliary-configuration>
@@ -10,4 +10,6 @@
</options>
</connection>
</connections>
<startup xmlns="http://jmri.org/xml/schema/auxiliary-configuration/startup-4-3-5.xsd">
</startup>
</auxiliary-configuration>
@@ -5,7 +5,7 @@
<options>
<option>
<name>SensorDefaultState</name>
<value>Unknown</value>
<value>First 4 per bank</value>
</option>
</options>
</connection>
@@ -10,5 +10,6 @@
</options>
</connection>
</connections>
<startup xmlns="http://jmri.org/xml/schema/auxiliary-configuration/startup-4-3-5.xsd"/>
<startup xmlns="http://jmri.org/xml/schema/auxiliary-configuration/startup-4-3-5.xsd">
</startup>
</auxiliary-configuration>
@@ -2,6 +2,8 @@

import java.io.IOException;

import jmri.util.JUnitAppender;

import org.junit.Ignore;
import org.junit.Test;

@@ -24,43 +26,36 @@
protected void launch(String[] args) {
SoundPro.main(args);
}

@Test
public void testLaunchLocoNet() throws IOException {
runOne("LocoNet_Simulator", "SoundPro", "SoundPro version"); // param 2 and 3 must match Console output
jmri.util.JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnPowerManager LnTrackStatusUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
jmri.util.JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnSensorUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
jmri.util.JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnSensorUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
}

@Test
public void testLaunchEasyDcc() throws IOException {
runOne("EasyDcc_Simulator", "SoundPro", "SoundPro version");
// param 1 is profile folder name, param 2 and 3 must match Console output
}

@Test
public void testLaunchGrapevine() throws IOException {
runOne("Grapevine_Simulator", "SoundPro", "SoundPro version");
jmri.util.JUnitAppender.suppressWarnMessage("Timeout can't be handled due to missing node (index 1)");
jmri.util.JUnitAppender.suppressWarnMessage("Timeout can't be handled due to missing node (index 0)");
JUnitAppender.suppressWarnMessage("Timeout can't be handled due to missing node (index 1)");
JUnitAppender.suppressWarnMessage("Timeout can't be handled due to missing node (index 0)");
}

@Test
public void testLaunchTmcc() throws IOException {
runOne("TMCC_Simulator", "SoundPro", "SoundPro version");
public void testLaunchLocoNet() throws IOException {
runOne("LocoNet_Simulator", "SoundPro", "SoundPro version");
JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnPowerManager LnTrackStatusUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnSensorUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnSensorUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
}

@Test
public void testLaunchSprog() throws IOException {
runOne("Sprog_Simulator", "PanelPro", "PanelPro version");
runOne("Sprog_Simulator", "SoundPro", "SoundPro version");
}

@Test
public void testLaunchInitLoop() throws IOException {
runOne("Prevent_Init_Loop", "SoundPro", "SoundPro version");
jmri.util.JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnPowerManager LnTrackStatusUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
jmri.util.JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnSensorUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
jmri.util.JUnitAppender.suppressWarnMessage("passing to xmit: unexpected exception: [LnSensorUpdateThread] jmri.jmrix.loconet.LnPacketizer.sendLocoNetMessage()");
public void testLaunchTmcc() throws IOException {
runOne("TMCC_Simulator", "SoundPro", "SoundPro version");
}

}

0 comments on commit 636cbc2

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