Skip to content

Commit 5e9bdf5

Browse files
committed
Update StateMachineStepByStepTest.java
1 parent 1179e1b commit 5e9bdf5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/test/java/jcs/commandStation/autopilot/state/StateMachineStepByStepTest.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,14 @@ public void setUp() {
7676
route.setLocked(false);
7777
ps.persist(route);
7878
}
79-
JCS.getJcsCommandStation().switchPower(true);
80-
AutoPilot.runAutoPilot(true);
81-
Logger.info("=========================== setUp done..............");
79+
if (JCS.getJcsCommandStation().connect()) {
80+
81+
JCS.getJcsCommandStation().switchPower(true);
82+
AutoPilot.runAutoPilot(true);
83+
Logger.info("=========================== setUp done..............");
84+
} else {
85+
Logger.error("###### Can't connect to command station! ########");
86+
}
8287
}
8388

8489
@AfterEach

0 commit comments

Comments
 (0)