Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFKA-10859: Add test annotation to FileStreamSourceTaskTest.testInvalidFile and speed up the test #11169

Closed
wants to merge 1 commit into from

Conversation

Borzoo
Copy link

@Borzoo Borzoo commented Aug 3, 2021

*More detailed description of your change,
Added the missing @test annotation to a test in FileStreamSourceTaskTest. The test used to loop 100 times, each time blocking for 1 second. Checking the assertion more than once is unnecessary for this test.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

Copy link
Contributor

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

@Borzoo thanks for this patch. some minor comments left.

public void testInvalidFile() throws InterruptedException {
replay();
Copy link
Contributor

Choose a reason for hiding this comment

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

pardon me. why it needs to call replay()?

// Currently the task retries indefinitely if the file isn't found, but shouldn't return any data.
for (int i = 0; i < 100; i++)
assertNull(task.poll());
assertNull(task.poll());
Copy link
Contributor

Choose a reason for hiding this comment

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

How about calling the poll again to make sure it does not cause error?

@chia7712
Copy link
Contributor

chia7712 commented May 2, 2024

This is fixed by 3dacdc5

@chia7712 chia7712 closed this May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants