From 8229e63839ca40aae01409896a5f2c50922bd605 Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 17 Apr 2024 23:23:05 +0800 Subject: [PATCH] fix: first message without delay --- tests/relay/test_rln.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/relay/test_rln.py b/tests/relay/test_rln.py index 71ab468a..08ebd1d0 100644 --- a/tests/relay/test_rln.py +++ b/tests/relay/test_rln.py @@ -48,10 +48,10 @@ class TestRelayRLN(StepsRLN, StepsRelay): logger.debug(f'Running test with payload {payload["description"]}') message = self.create_message(payload=to_base64(payload["value"])) try: - if (i + 1) % 2 == 1: # every odd sample should be sent slowly + if i % 2 == 1: # every sample with odd index is sent slowly delay(self.epoch_time) now = math.trunc(time()) - # logger.debug(f"Message sent at timestamp {now}") + logger.debug(f"Message sent at timestamp {now}") self.publish_message(message) if i > 0 and (now - previous) == 0: raise AssertionError("Publish with RLN enabled at spam rate worked!!!")