mirror of
https://github.com/logos-messaging/logos-messaging-interop-tests.git
synced 2026-01-07 00:13:06 +00:00
add new pause test
This commit is contained in:
parent
57822dc86b
commit
e836666b25
@ -25,7 +25,7 @@ class BaseClient(ABC):
|
||||
logger.error(f"An error occurred: {err}. Response content: {response.content}")
|
||||
raise
|
||||
else:
|
||||
logger.error(f"Response status code: {response.status_code}. Response content: {response.content}")
|
||||
logger.info(f"Response status code: {response.status_code}. Response content: {response.content}")
|
||||
return response
|
||||
|
||||
@abstractmethod
|
||||
|
||||
@ -3,6 +3,7 @@ from time import time
|
||||
from src.libs.common import delay, to_base64
|
||||
from src.steps.relay import StepsRelay
|
||||
from src.test_data import INVALID_CONTENT_TOPICS, INVALID_PAYLOADS, SAMPLE_INPUTS, SAMPLE_TIMESTAMPS, VALID_PUBSUB_TOPICS
|
||||
from src.data_classes import message_rpc_response_schema
|
||||
|
||||
logger = get_custom_logger(__name__)
|
||||
|
||||
@ -195,6 +196,16 @@ class TestRelayPublish(StepsRelay):
|
||||
except Exception as ex:
|
||||
assert "Peer node couldn't find any messages" in str(ex)
|
||||
|
||||
def test_publish_while_peer_is_paused(self):
|
||||
message = self.create_message()
|
||||
self.node2.pause()
|
||||
self.node1.send_message(message, self.test_pubsub_topic)
|
||||
self.node2.unpause()
|
||||
get_messages_response = self.node2.get_messages(self.test_pubsub_topic)
|
||||
assert get_messages_response, "Peer node couldn't find any messages"
|
||||
received_message = message_rpc_response_schema.load(get_messages_response[0])
|
||||
self.assert_received_message(message, received_message)
|
||||
|
||||
def test_publish_after_node_pauses_and_pauses(self):
|
||||
self.check_published_message_reaches_peer(self.create_message())
|
||||
self.node1.pause()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user