mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Bail out of the integration tests if enable fails (#792)
A failure is much better then an infinite loop.
This commit is contained in:
committed by
Peter Johnson
parent
65cc85f68d
commit
64bfdc1a69
@@ -66,6 +66,12 @@ public abstract class AbstractComsSetup {
|
||||
// Wait until the robot is enabled before starting the tests
|
||||
int enableCounter = 0;
|
||||
while (!DriverStation.getInstance().isEnabled()) {
|
||||
if (enableCounter > 50) {
|
||||
// Robot did not enable properly after 5 seconds.
|
||||
// Force exit
|
||||
TestBench.err().println("Failed to enable. Aborting");
|
||||
System.exit(1);
|
||||
}
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} catch (InterruptedException ex) {
|
||||
|
||||
Reference in New Issue
Block a user