Skip to content

fix: replace hardcoded sleeps with polling in session manager tests#324

Merged
jariy17 merged 1 commit intoaws:mainfrom
Hweinstock:integ-test/cleanup-session-manager
Mar 12, 2026
Merged

fix: replace hardcoded sleeps with polling in session manager tests#324
jariy17 merged 1 commit intoaws:mainfrom
Hweinstock:integ-test/cleanup-session-manager

Conversation

@Hweinstock
Copy link
Contributor

Problem

test_session_manager.py had hardcoded time.sleep(90) for extraction and time.sleep(15) for throttle avoidance. This is slow and unreliable. We want this test to able to run in under 10 minutes, but it currently takes much longer.

Solution

  • Replaced sleep(90) with client.wait_for_memories().
  • Reduced throttle sleep from 15s to 2s.
  • Add to CI in parallel with 10 minute in parallel.

Testing

  • ran in my dev account. Took about 8 min (but with hardcoded polling it took almost twice as long)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter
Copy link

codecov-commenter commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@7d7fa48). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #324   +/-   ##
=======================================
  Coverage        ?   90.84%           
=======================================
  Files           ?       42           
  Lines           ?     4041           
  Branches        ?      622           
=======================================
  Hits            ?     3671           
  Misses          ?      203           
  Partials        ?      167           
Flag Coverage Δ
unittests 90.84% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Hweinstock Hweinstock marked this pull request as ready for review March 11, 2026 21:39
@Hweinstock Hweinstock requested a review from a team March 11, 2026 21:39
@Hweinstock Hweinstock force-pushed the integ-test/cleanup-session-manager branch from 26f7164 to 55f0274 Compare March 12, 2026 13:49
@jariy17 jariy17 merged commit 18b428a into aws:main Mar 12, 2026
17 of 18 checks passed
@Hweinstock Hweinstock deleted the integ-test/cleanup-session-manager branch March 12, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants