When run from tox, the test fail almost every time:
def test_flooding_prevention(sentry_init_custom): """Ensure that an infinite synchronization due to a unhandled error will not explode the Sentry quota. """ def whoopsy(): """Problematic function ... """ try: raise ValueError("Mock'ed error") except Exception: capture_exception() def whoopsy2(): """Problematic function ... """ try: raise ValueError("Mock'ed error") except Exception: capture_exception() sentry_init_custom(before_send=nxdrive.tracing.before_send) # Ensure there is no event by default assert not nxdrive.tracing._EVENTS # The first event of an error should be sent whoopsy() > assert len(nxdrive.tracing._EVENTS) == 1 E AssertionError: assert 0 == 1
- is related to
-
NXDRIVE-2550 Prevent Sentry flooding
- Resolved