Skip to content

Commit

Permalink
Make unit test more stable.
Browse files Browse the repository at this point in the history
  • Loading branch information
KomachiSion committed Oct 14, 2024
1 parent e516932 commit 4bb27cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sys/src/test/java/com/alibaba/nacos/sys/env/EnvUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.alibaba.nacos.common.utils.ThreadUtils;
import com.alibaba.nacos.plugin.environment.CustomEnvironmentPluginManager;
import com.alibaba.nacos.plugin.environment.spi.CustomEnvironmentPluginService;
import com.alibaba.nacos.sys.utils.DiskUtils;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
Expand Down Expand Up @@ -348,6 +349,7 @@ void testReadClusterConfFromSystem() throws IOException {

@Test
void testWriteClusterConf() throws IOException {
DiskUtils.forceMkdir(EnvUtil.getNacosHome() + "/conf");
EnvUtil.writeClusterConf("127.0.0.1");
File file = new File(EnvUtil.getNacosHome() + "/conf/cluster.conf");
assertTrue(file.exists());
Expand Down

0 comments on commit 4bb27cc

Please sign in to comment.