Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.timeout;
import static org.mockito.Mockito.verify;

@SuppressWarnings("unchecked")
Expand Down Expand Up @@ -216,7 +216,7 @@ public void putTopicStateRetriableFailure() {
}).when(kafkaBasedLog).send(eq(key), valueCaptor.capture(), any(Callback.class));

store.put(topicStatus);
verify(kafkaBasedLog, times(2)).send(any(), any(), any());
verify(kafkaBasedLog, timeout(1000).times(2)).send(any(), any(), any());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @vamossagar12 thanks for the PR.
Just for my own understanding, how was the timeout value chosen?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are we concerned this could still be flaky?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@machi1990 it was originally 300 ms but @viktorsomogyi suggested to bump it up to 1s #13594 (comment). @jolshan i haven't seen this test fail in the last few builds with this PR and #13594.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks @vamossagar12 for the reply. 1s seems like a high enough value timeout so it might be enough to make this test resilient.


// check capture state
assertEquals(topicStatus, store.parseTopicStatus(valueCaptor.getValue()));
Expand Down