Skip to content

Commit

Permalink
ほぼ 100% 再現する
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Jan 27, 2024
1 parent c11b787 commit 941ae97
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test_messaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ def on_notify(self, raw_message):
and message["event_type"] == "connection.created"
and message["connection_id"] == self.connection_id
):
print("Sora に接続しました")
print(f"Sora に接続しました: connection_id={self.connection_id}")
self.connection_created = True

def on_disconnect(self, error_code, message):
print(f"Sora から切断されました: error_code='{error_code}' message='{message}'")
print(f"Sora から切断しました: error_code='{error_code}' message='{message}'")
self.disconnected = True

def on_message(self, label, data):
Expand Down Expand Up @@ -94,6 +94,8 @@ def recvonly(signaling_urls, channel_id, label, metadata):

assert msg_recvonly.connection_created is True

time.sleep(3)

msg_recvonly.disconnect()


Expand All @@ -119,7 +121,7 @@ def test_messaging_direction_recvonly():

msg_sendonly.send(b"Hello, world!")

time.sleep(1)
time.sleep(3)

msg_recvonly.disconnect()
msg_sendonly.disconnect()

0 comments on commit 941ae97

Please sign in to comment.