Skip to content
Permalink
Browse files

conditional waitFor

  • Loading branch information...
silverailscolo committed May 29, 2019
1 parent 2f2ee32 commit 11fc0de14ded4c53e10a3179565fc0a3fbed77f5
Showing with 3 additions and 4 deletions.
  1. +3 −4 java/test/jmri/implementation/MatrixSignalMastTest.java
@@ -131,12 +131,11 @@ public void testAspects() {

m.setAspect("Clear");
Assert.assertEquals("check Clear", "Clear", m.getAspect());
JUnitUtil.waitFor(100); // next test fails on Travis and Appveyor servers without the waitFor(100) statement
Assert.assertEquals("it11 for Clear", Turnout.CLOSED, it11.getCommandedState()); // it12 state is more fragile
JUnitUtil.waitFor( ()->{ return it11.getCommandedState() == Turnout.CLOSED; }, "it11 for Clear" );
m.setAspect("Stop");
Assert.assertEquals("check Stop", "Stop", m.getAspect());
JUnitUtil.waitFor(100); // next test fails on Travis and Appveyor servers without the waitFor(100) statement
Assert.assertEquals("it11 for Stop", Turnout.THROWN, it11.getCommandedState()); // it12 state is more fragile
JUnitUtil.waitFor( ()->{ return it12.getCommandedState() == Turnout.THROWN; }, "it12 for Stop" );
// it12 state is more fragile
}

public void testAspectAttributes() {

0 comments on commit 11fc0de

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