Skip to content

Commit

Permalink
added ut
Browse files Browse the repository at this point in the history
  • Loading branch information
heesung-sn committed Apr 19, 2024
1 parent 76c1b4e commit d832553
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ public Object[][] conditionOfSwitchThread(){
};
}

@Test(dataProvider = "conditionOfSwitchThread")
@Test(dataProvider = "conditionOfSwitchThread", invocationTimeOut = 30_000)
public void testThreadSwitchOfZkMetadataStore(boolean hasSynchronizer, boolean enabledBatch) throws Exception {
final String prefix = newKey();
final String metadataStoreName = UUID.randomUUID().toString().replaceAll("-", "");
Expand Down Expand Up @@ -481,6 +481,19 @@ public void testThreadSwitchOfZkMetadataStore(boolean hasSynchronizer, boolean e
verify.run();
return null;
}).join();
// blocking chaining call
store.get(prefix + "/d1").thenApply((ignore) -> {
try {
verify.run();
return store.get(prefix + "/e1").thenApply((ignore2) -> {
verify.run();
return null;
}).get();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
).get(5, TimeUnit.SECONDS);
// get the node which is not exists.
store.get(prefix + "/non").thenApply((ignore) -> {
verify.run();
Expand Down

0 comments on commit d832553

Please sign in to comment.