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 @@ -493,7 +493,7 @@ private KafkaChannel createConnectionWithStagedReceives(int maxStagedReceives) t
do {
selector.poll(1000);
} while (selector.completedReceives().isEmpty());
} while (selector.numStagedReceives(channel) == 0 && !channel.hasBytesBuffered() && --retries > 0);
} while ((selector.numStagedReceives(channel) == 0 || channel.hasBytesBuffered()) && --retries > 0);
assertTrue("No staged receives after 100 attempts", selector.numStagedReceives(channel) > 0);
// We want to return without any bytes buffered to ensure that channel will be closed after idle time
assertFalse("Channel has bytes buffered", channel.hasBytesBuffered());
Expand Down