Skip to content

Commit

Permalink
Fix another flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrattli committed Mar 4, 2022
1 parent 189bad2 commit 5ebd8d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_scheduler/test_eventloopscheduler.py
@@ -1,3 +1,4 @@
import os
import threading
import unittest
from datetime import timedelta
Expand All @@ -9,13 +10,16 @@
from reactivex.internal.basic import default_now
from reactivex.scheduler import EventLoopScheduler

CI = os.getenv("CI") is not None


class TestEventLoopScheduler(unittest.TestCase):
def test_event_loop_now(self):
scheduler = EventLoopScheduler()
diff = scheduler.now - default_now()
assert abs(diff) < timedelta(milliseconds=5)

@pytest.mark.skipif(CI, reason="Flaky test in GitHub Actions")
def test_event_loop_now_units(self):
scheduler = EventLoopScheduler()
diff = scheduler.now
Expand Down

0 comments on commit 5ebd8d9

Please sign in to comment.