mirror of
https://github.com/logos-messaging/logos-messaging-interop-tests.git
synced 2026-01-04 06:53:07 +00:00
fixed for lightpush with big payload (#39)
This commit is contained in:
parent
d0a84b2009
commit
73a1711d54
@ -48,27 +48,23 @@ class TestLightPushPublish(StepsLightPush):
|
|||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
assert "Bad Request" in str(ex) or "missing Payload field" in str(ex)
|
assert "Bad Request" in str(ex) or "missing Payload field" in str(ex)
|
||||||
|
|
||||||
def test_light_push_with_payload_less_than_300_kb(self):
|
def test_light_push_with_payload_less_than_150_kb(self):
|
||||||
payload_length = 1024 * 200 # after encoding to base64 this will be close to 260KB
|
payload_length = 1024 * 140
|
||||||
logger.debug(f"Running test with payload length of {payload_length} bytes")
|
logger.debug(f"Running test with payload length of {payload_length} bytes")
|
||||||
message = self.create_message(payload=to_base64("a" * (payload_length)))
|
message = self.create_message(payload=to_base64("a" * (payload_length)))
|
||||||
self.check_light_pushed_message_reaches_receiving_peer(message=message)
|
self.check_light_pushed_message_reaches_receiving_peer(message=message)
|
||||||
|
|
||||||
@pytest.mark.xfail("nwaku" in NODE_2, reason="https://github.com/waku-org/nwaku/issues/2565")
|
def test_light_push_with_payload_of_150_kb(self):
|
||||||
@pytest.mark.xfail("go-waku" in NODE_2, reason="https://github.com/waku-org/go-waku/issues/1076")
|
payload_length = 1024 * 150
|
||||||
def test_light_push_with_payload_around_300_kb(self):
|
|
||||||
payload_length = 1024 * 225 # after encoding to base64 this will be close to 300KB
|
|
||||||
logger.debug(f"Running test with payload length of {payload_length} bytes")
|
logger.debug(f"Running test with payload length of {payload_length} bytes")
|
||||||
message = self.create_message(payload=to_base64("a" * (payload_length)))
|
message = self.create_message(payload=to_base64("a" * (payload_length)))
|
||||||
try:
|
try:
|
||||||
self.check_light_pushed_message_reaches_receiving_peer(message=message, message_propagation_delay=2)
|
self.check_light_pushed_message_reaches_receiving_peer(message=message, message_propagation_delay=2)
|
||||||
raise AssertionError("Message with payload > 1MB was received")
|
raise AssertionError("Message with payload of 150kb was received")
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
assert "couldn't find any messages" in str(ex)
|
assert "Message size exceeded maximum of 153600 bytes" in str(ex)
|
||||||
|
|
||||||
@pytest.mark.xfail("nwaku" in NODE_2, reason="https://github.com/waku-org/nwaku/issues/2565")
|
def test_light_push_with_payload_of_1_MB(self):
|
||||||
@pytest.mark.xfail("go-waku" in NODE_2, reason="https://github.com/waku-org/go-waku/issues/1076")
|
|
||||||
def test_light_push_with_payload_more_than_1_MB(self):
|
|
||||||
payload_length = 1024 * 1024
|
payload_length = 1024 * 1024
|
||||||
logger.debug(f"Running test with payload length of {payload_length} bytes")
|
logger.debug(f"Running test with payload length of {payload_length} bytes")
|
||||||
message = self.create_message(payload=to_base64("a" * (payload_length)))
|
message = self.create_message(payload=to_base64("a" * (payload_length)))
|
||||||
@ -76,7 +72,7 @@ class TestLightPushPublish(StepsLightPush):
|
|||||||
self.check_light_pushed_message_reaches_receiving_peer(message=message, message_propagation_delay=2)
|
self.check_light_pushed_message_reaches_receiving_peer(message=message, message_propagation_delay=2)
|
||||||
raise AssertionError("Message with payload > 1MB was received")
|
raise AssertionError("Message with payload > 1MB was received")
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
assert "couldn't find any messages" in str(ex)
|
assert "Message size exceeded maximum of 153600 bytes" in str(ex)
|
||||||
|
|
||||||
def test_light_push_with_valid_content_topics(self):
|
def test_light_push_with_valid_content_topics(self):
|
||||||
failed_content_topics = []
|
failed_content_topics = []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user