diff --git a/trafficlight/internals/client.py b/trafficlight/internals/client.py index 8b7f342..c5d0360 100644 --- a/trafficlight/internals/client.py +++ b/trafficlight/internals/client.py @@ -249,7 +249,7 @@ async def enable_key_backup(self, key_backup_passphrase: str) -> None: ) async def open_room(self, room_name: str) -> None: - await self._perform_action({"action": "open-room", "data": {"name": room_name}}) + await self._perform_action({"action": "open_room", "data": {"name": room_name}}) async def advance_clock(self, duration: int) -> None: await self._perform_action( diff --git a/trafficlight/tests/retry_sendToDevice_test.py b/trafficlight/tests/retry_sendToDevice_test.py index 3f26cc0..1cd5581 100644 --- a/trafficlight/tests/retry_sendToDevice_test.py +++ b/trafficlight/tests/retry_sendToDevice_test.py @@ -7,6 +7,8 @@ from trafficlight.server_types import SynapseDevelop +# CLIENT_COUNT=2 REQUIRES_PROXY=true CYPRESS_BASE_URL="https://app.element.io" ./trafficlight/scripts-dev/run-localdev-setup.sh && tmux kill-server +# TEST STATUS: PASSING class RetrySendToDeviceTest(Test): def __init__(self) -> None: super().__init__() @@ -23,10 +25,9 @@ async def run( network_proxy: NetworkProxyClient, ) -> None: await network_proxy.proxy_to(server) - await alice.register(network_proxy) + await asyncio.gather(alice.register(network_proxy), bob.register(server)) await alice.create_room("little test room") - await bob.register(server) await alice.invite_user(bob.localpart + ":" + server.server_name) await bob.accept_invite() await network_proxy.disable_endpoint("/_matrix/client/r0/sendToDevice") @@ -39,5 +40,5 @@ async def run( await network_proxy.wait_until_endpoint_accessed( "/_matrix/client/r0/sendToDevice" ) - await asyncio.sleep(5000) + await asyncio.sleep(5) await bob.verify_message_in_timeline("A random message appears!") diff --git a/trafficlight/tests/test_verification_when_todevice_message_out_of_order_test.py b/trafficlight/tests/verification_when_todevice_message_out_of_order_test.py similarity index 92% rename from trafficlight/tests/test_verification_when_todevice_message_out_of_order_test.py rename to trafficlight/tests/verification_when_todevice_message_out_of_order_test.py index 32ac875..faee72a 100644 --- a/trafficlight/tests/test_verification_when_todevice_message_out_of_order_test.py +++ b/trafficlight/tests/verification_when_todevice_message_out_of_order_test.py @@ -7,8 +7,9 @@ from trafficlight.server_types import SynapseDevelop # Test Script: -# CLIENT_COUNT=2 REQUIRES_PROXY=true CYPRESS_BASE_URL="https://develop.element.io" -# ./trafficlight/scripts-dev/run-localdev-setup.sh && tmux kill-server +# CLIENT_COUNT=2 REQUIRES_PROXY=true CYPRESS_BASE_URL="https://develop.element.io" ./trafficlight/scripts-dev/run-localdev-setup.sh && tmux kill-server + +# Test Status: Passing class VerifyWhenToDeviceMessagesOutOfOrder(Test):