Skip to content

Replace sleep with assert period in file tests#1802

Merged
davsclaus merged 1 commit into
apache:mainfrom
Dolanss:test/remove-thread-sleep-file-starter
Jun 2, 2026
Merged

Replace sleep with assert period in file tests#1802
davsclaus merged 1 commit into
apache:mainfrom
Dolanss:test/remove-thread-sleep-file-starter

Conversation

@Dolanss
Copy link
Copy Markdown
Contributor

@Dolanss Dolanss commented May 30, 2026

This replaces Thread.sleep() with MockEndpoint#setAssertPeriod(...) in two file component tests.

These tests are checking that no exchanges are received during a period of time, so using an assert period makes the intent clearer and avoids relying on sleep-based timing.

Updated tests:

  • FileConsumerIdempotentTest
  • FilerConsumerDoneFileNamePrefixTest

@davsclaus davsclaus merged commit 08dffb5 into apache:main Jun 2, 2026
5 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.

3 participants