diff --git a/test/src/test/java/org/apache/seata/common/ConfigurationTestHelper.java b/test/src/test/java/org/apache/seata/common/ConfigurationTestHelper.java index eafd88cb526..5045d21c286 100644 --- a/test/src/test/java/org/apache/seata/common/ConfigurationTestHelper.java +++ b/test/src/test/java/org/apache/seata/common/ConfigurationTestHelper.java @@ -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);