mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
Completely disable watchdog tests on mac (#1679)
They’re just not reliable.
This commit is contained in:
committed by
Peter Johnson
parent
698edfda9d
commit
7732836bd5
@@ -17,7 +17,11 @@
|
||||
|
||||
using namespace frc;
|
||||
|
||||
#ifdef __APPLE__
|
||||
TEST(WatchdogTest, DISABLED_EnableDisable) {
|
||||
#else
|
||||
TEST(WatchdogTest, EnableDisable) {
|
||||
#endif
|
||||
uint32_t watchdogCounter = 0;
|
||||
|
||||
Watchdog watchdog(0.4, [&] { watchdogCounter++; });
|
||||
@@ -48,7 +52,11 @@ TEST(WatchdogTest, EnableDisable) {
|
||||
<< "Watchdog either didn't trigger or triggered more than once";
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
TEST(WatchdogTest, DISABLED_Reset) {
|
||||
#else
|
||||
TEST(WatchdogTest, Reset) {
|
||||
#endif
|
||||
uint32_t watchdogCounter = 0;
|
||||
|
||||
Watchdog watchdog(0.4, [&] { watchdogCounter++; });
|
||||
@@ -85,7 +93,11 @@ TEST(WatchdogTest, SetTimeout) {
|
||||
<< "Watchdog either didn't trigger or triggered more than once";
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
TEST(WatchdogTest, DISABLED_IsExpired) {
|
||||
#else
|
||||
TEST(WatchdogTest, IsExpired) {
|
||||
#endif
|
||||
Watchdog watchdog(0.2, [] {});
|
||||
EXPECT_FALSE(watchdog.IsExpired());
|
||||
watchdog.Enable();
|
||||
@@ -101,7 +113,11 @@ TEST(WatchdogTest, IsExpired) {
|
||||
EXPECT_FALSE(watchdog.IsExpired());
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
TEST(WatchdogTest, DISABLED_Epochs) {
|
||||
#else
|
||||
TEST(WatchdogTest, Epochs) {
|
||||
#endif
|
||||
uint32_t watchdogCounter = 0;
|
||||
|
||||
Watchdog watchdog(0.4, [&] { watchdogCounter++; });
|
||||
|
||||
@@ -17,6 +17,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@DisabledOnOs(OS.MAC)
|
||||
class WatchdogTest {
|
||||
@Test
|
||||
void enableDisableTest() {
|
||||
@@ -189,7 +190,6 @@ class WatchdogTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisabledOnOs(OS.MAC)
|
||||
void multiWatchdogTest() {
|
||||
final AtomicInteger watchdogCounter1 = new AtomicInteger(0);
|
||||
final AtomicInteger watchdogCounter2 = new AtomicInteger(0);
|
||||
|
||||
Reference in New Issue
Block a user