Skip to content

Commit

Permalink
单测小调整。
Browse files Browse the repository at this point in the history
  • Loading branch information
wangliang181230 committed Apr 1, 2024
1 parent 5df0bcf commit 818822e
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,13 @@ public static void removeConfig(String dataId) {
}

public static void putConfig(String dataId, String content) {
CountDownLatch countDownLatch = new CountDownLatch(1);
ConfigurationFactory.getInstance().addConfigListener(ConfigurationKeys.SERVER_SERVICE_PORT_CAMEL,
new CachedConfigurationChangeListener() {
@Override
public void onChangeEvent(ConfigurationChangeEvent event) {
countDownLatch.countDown();
}
});
if (content == null) {
removeConfig(dataId);
return;
}

CountDownLatch countDownLatch = new CountDownLatch(1);
ConfigurationCache.addConfigListener(dataId, event -> countDownLatch.countDown());
ConfigurationFactory.getInstance().addConfigListener(dataId, event -> countDownLatch.countDown());
System.setProperty(dataId, content);
ConfigurationFactory.getInstance().putConfig(dataId, content);

Expand Down

0 comments on commit 818822e

Please sign in to comment.