Clean up system property after running the test case (#11711)

This commit is contained in:
Qishang Zhong 2024-01-31 09:30:01 +08:00 committed by GitHub
parent 849393c4a1
commit bd5caa64a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,6 +16,7 @@
package com.alibaba.nacos.plugin.control.utils;
import org.junit.After;
import org.junit.Assert;
import org.junit.Test;
@ -23,6 +24,11 @@ import java.io.File;
public class EnvUtilsTest {
@After
public void tearDown() throws Exception {
System.clearProperty("nacos.home");
}
@Test
public void test() {
String nacosHome = EnvUtils.getNacosHome();