Skip to content

Commit

Permalink
Remove accidental commmit
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkaye committed Sep 27, 2023
1 parent 14efa47 commit f1027b6
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 22 deletions.
11 changes: 0 additions & 11 deletions trafficlight/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,6 @@ async def startup() -> None:
if kiwi.kiwi_client:
await kiwi.kiwi_client.start_run()

async def wait_for_done() -> None:
try:
if suite.done() for suite in get_testsuites():
if suite.done()
logger.info("Everything done!")
await app.shutdown()

app.add_background_task(
wait_for_done,
)

@app.after_serving
async def shutdown() -> None:
adapter.stop_background_tasks = True
Expand Down
2 changes: 1 addition & 1 deletion trafficlight/internals/testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ async def run(
server.finished()
if kiwi.kiwi_client:
await kiwi.kiwi_client.report_status(self)
self.completed.set_result(True)
self.completed.set_result()

async def wait_for_completion(self) -> None:
self.completed = asyncio.get_running_loop().create_future()
Expand Down
2 changes: 2 additions & 0 deletions trafficlight/internals/testsuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@ def done(self) -> bool:
)
> 0
)
else:
return False
9 changes: 3 additions & 6 deletions trafficlight/tests/video/ec_basic_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@ def __init__(self) -> None:

async def run(self, alice: ElementCallClient, bob: ElementCallClient) -> None:
room_name = "tl_chat_" + str(datetime.now().timestamp())
(alice_joined, bob_joined) = await asyncio.gather(
alice.create_or_join(room_name), bob.create_or_join(room_name)
)
await alice.create(room_name)
alice_lobby = await alice.get_lobby_data()

# Check only one of alice or bob joined the room (the other created it)
# between two single-bit booleans, this is xor
print(str(alice_joined) + " or " + str(bob_joined))
await bob.join_by_url(alice_lobby.invite_url)

await asyncio.gather(alice.lobby_join(), bob.lobby_join())
await asyncio.sleep(5)
Expand Down
2 changes: 1 addition & 1 deletion trafficlight/tests/video/load_test_call_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async def run(self, alice: ElementCallClient, bob: ElementCallClient) -> None:
room_name = "tl_chat_" + str(datetime.now().timestamp())

# Create room
await alice.create_or_join(room_name)
await alice.create(room_name)

lobby_data = await alice.get_lobby_data()

Expand Down
7 changes: 4 additions & 3 deletions trafficlight/tests/video/three_user_spotlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ async def run(self, alice: ElementCallClient, bob: ElementCallClient) -> None:

room_name = "tl_chat_" + str(datetime.now().timestamp())

await asyncio.gather(
alice.create_or_join(room_name), bob.create_or_join(room_name)
)
await alice.create(room_name)
alice_lobby = await alice.get_lobby_data()

await bob.join_by_url(alice_lobby.invite_url)

# lobby screen
await asyncio.gather(alice.lobby_join(), bob.lobby_join())
Expand Down

0 comments on commit f1027b6

Please sign in to comment.