Skip to content

Commit

Permalink
don't give upload_song fixture as many opportunities to succeed
Browse files Browse the repository at this point in the history
  • Loading branch information
apastel committed May 10, 2024
1 parent ac04949 commit 7cb3c7f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,10 @@ def fixture_upload_song(config, yt_browser: YTMusic) -> Dict | None:
assert upload_response == "STATUS_SUCCEEDED" or upload_response.status_code == 200

# Wait for upload to finish processing
retries_remaining = 10
retries_remaining = 20
while retries_remaining:
time.sleep(5)
try:
songs = yt_browser.get_library_upload_songs(limit=None)
except KeyError:
pass
time.sleep(2)
songs = yt_browser.get_library_upload_songs(limit=None)
for song in songs:
if song.get("title") in config["uploads"]["file"]:
return song
Expand Down

0 comments on commit 7cb3c7f

Please sign in to comment.