lhotari commented on code in PR #23902:
URL: https://github.com/apache/pulsar/pull/23902#discussion_r1933889473
##########
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/coordination/impl/ResourceLockImpl.java:
##########
@@ -188,6 +188,17 @@ private CompletableFuture<Void>
acquireWithNoRevalidation(T newValue) {
CompletableFuture<Void> result = new CompletableFuture<>();
store.put(path, payload, Optional.of(version),
EnumSet.of(CreateOption.Ephemeral))
.thenAccept(stat -> {
+ if (!stat.isEphemeral()) {
Review Comment:
I wonder if this problem is caused by org.apache.zookeeper.MockZooKeeper?
org.apache.pulsar.zookeeper.ZookeeperServerTest would be a real Zookeeper
server. It would be great to have support directly in
org.apache.pulsar.broker.testcontext.PulsarTestContext to use a real Zookeeper
server. It's not that hard to implement in a similar way as
`withMockZookeeper()`:
https://github.com/apache/pulsar/blob/b6cfecce5f3a1eecbf6f5df81cb835fbbfe35980/pulsar-broker/src/test/java/org/apache/pulsar/broker/testcontext/PulsarTestContext.java#L450-L490
Adding similar `withRealZookeeper()` (using
org.apache.pulsar.zookeeper.ZookeeperServerTest) would be useful.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]