Skip to content

Commit 93ada71

Browse files
Manciukicroypat
authored andcommitted
test(balloon): ensure we gave stats enough time to update before reading
test_balloon_snapshot started being flaky after we changed the logic on how we wait for the RSS to become stable. One theory is that we are not waiting enough time for the stats to refresh, so this change adds a sleep to ensure we have waited enough for the stats to be "fresh". Failure: ``` assert 189022208 > 189022208 ``` Signed-off-by: Riccardo Mancini <mancio@amazon.com>
1 parent 36c8d95 commit 93ada71

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/integration_tests/functional/test_balloon.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,8 @@ def test_balloon_snapshot(microvm_factory, guest_kernel, rootfs):
522522

523523
# Get the stats after we take a snapshot and dirty some memory,
524524
# then reclaim it.
525+
# Ensure we gave enough time for the stats to update.
526+
time.sleep(STATS_POLLING_INTERVAL_S)
525527
latest_stats = microvm.api.balloon_stats.get().json()
526528

527529
# Ensure the stats are still working after restore and show

0 commit comments

Comments
 (0)