Skip to content

Commit

Permalink
Fix testSeekCustomTopicMessageId
Browse files Browse the repository at this point in the history
  • Loading branch information
BewareMyPower committed Mar 5, 2024
1 parent 9b65f62 commit 901c6a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -836,5 +836,8 @@ public void testHasMessageAvailableAfterSeek(boolean initializeLastMessageIdInBr
reader.seek(MessageId.latest);
// lastMessageIdInBroker is the last message ID, while startMessageId is still earliest
assertFalse(reader.hasMessageAvailable());

producer.send("msg");
assertTrue(reader.hasMessageAvailable());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2289,7 +2289,7 @@ private void seekAsyncInternal(long requestId, ByteBuf seek, MessageId seekId, S
clearIncomingMessages();
CompletableFuture<Void> future = null;
synchronized (this) {
if (cnx() == null) {
if (!hasParentConsumer && cnx() == null) {
// It's during reconnection, complete the seek future after connection is established
seekStatus.set(SeekStatus.COMPLETED);
} else {
Expand Down

0 comments on commit 901c6a9

Please sign in to comment.