Skip to content

test: replace Thread.sleep with Awaitility in integration tests#823

Merged
dkropachev merged 1 commit intoscylladb:scylla-4.xfrom
dkropachev:replace-thread-sleep-with-awaitility
Mar 28, 2026
Merged

test: replace Thread.sleep with Awaitility in integration tests#823
dkropachev merged 1 commit intoscylladb:scylla-4.xfrom
dkropachev:replace-thread-sleep-with-awaitility

Conversation

@dkropachev
Copy link
Copy Markdown

@dkropachev dkropachev commented Mar 1, 2026

Summary

  • Replace fixed Thread.sleep calls with Awaitility polling in integration tests
  • Affected tests: MetricsITBase, DefaultMetadataTabletMapIT, MockResolverIT
  • DriverBlockHoundIntegrationIT left unchanged (intentional sleep for BlockHound)
  • Eliminates wasted wait time by polling for expected conditions

Test plan

  • All modified tests pass locally
  • CI integration tests pass with no regressions

@dkropachev dkropachev self-assigned this Mar 1, 2026
@dkropachev dkropachev force-pushed the replace-thread-sleep-with-awaitility branch from a26bd19 to e4e685b Compare March 1, 2026 23:19
@dkropachev dkropachev requested a review from nikagra March 1, 2026 23:30
@dkropachev dkropachev marked this pull request as ready for review March 2, 2026 03:07
@dkropachev dkropachev force-pushed the replace-thread-sleep-with-awaitility branch 2 times, most recently from 33ad156 to 9ebff2d Compare March 28, 2026 02:45
@dkropachev dkropachev requested a review from nikagra March 28, 2026 02:46
Copy link
Copy Markdown

@nikagra nikagra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build issues (formatting most probably), but changes are ok 👌

Replace fixed Thread.sleep calls with Awaitility's polling-based
waiting in MetricsITBase, DefaultMetadataTabletMapIT, and
MockResolverIT. This eliminates wasted wait time by polling for
the expected condition instead of sleeping for a fixed duration.

DriverBlockHoundIntegrationIT is left unchanged as its sleep is
intentional for BlockHound testing.
@dkropachev dkropachev force-pushed the replace-thread-sleep-with-awaitility branch from 9ebff2d to c994e52 Compare March 28, 2026 12:26
@dkropachev dkropachev merged commit a8a6293 into scylladb:scylla-4.x Mar 28, 2026
20 checks passed
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.

2 participants