Skip to content

Commit dc8c2be

Browse files
committed
Improve tests
1 parent 271d004 commit dc8c2be

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/ConsumerTest.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,7 +1585,14 @@ TEST(ConsumerTest, testCloseAfterSeek) {
15851585
// Test the previous consumer will be closed even after seek is done, at the moment the connection might
15861586
// not be established.
15871587
ASSERT_EQ(ResultOk, client.subscribe(topic, subscription, consumer));
1588+
1589+
// Test creating a consumer from a different client should also work for this case
1590+
Client anotherClient(lookupUrl);
1591+
consumer.closeAsync(nullptr);
1592+
ASSERT_EQ(ResultOk, anotherClient.subscribe(topic, subscription, consumer));
1593+
15881594
client.close();
1595+
anotherClient.close();
15891596
}
15901597

15911598
} // namespace pulsar

0 commit comments

Comments
 (0)