Skip to content

Commit

Permalink
test: adjust the test cases related to dynamic configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
funky-eyes committed Apr 7, 2024
1 parent 3b6a8a0 commit 802167b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ void addConfigListener() throws InterruptedException {
String dataId = "service.disableGlobalTransaction";
boolean value = fileConfig.getBoolean(dataId);
fileConfig.addConfigListener(dataId, (CachedConfigurationChangeListener)event -> {
if(!event.getNewValue().equals(String.valueOf(value))) {
countDownLatch.countDown();
}
Assertions.assertEquals(Boolean.parseBoolean(event.getNewValue()),
!Boolean.parseBoolean(event.getOldValue()));
countDownLatch.countDown();
});
System.setProperty(dataId, String.valueOf(!value));
countDownLatch.await(10, TimeUnit.SECONDS);
Expand Down

0 comments on commit 802167b

Please sign in to comment.