Skip to content

Commit 5e577c4

Browse files
Fix multiple tests in ServiceConfigTest.java (#15785)
1 parent 1747f99 commit 5e577c4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ServiceConfigTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ class ServiceConfigTest {
100100
public void setUp() throws Exception {
101101
DubboBootstrap.reset();
102102

103+
SysProps.setProperty("dubbo.metrics.enabled", "false");
104+
SysProps.setProperty("dubbo.metrics.protocol", "disabled");
105+
103106
service = new ServiceConfig<>();
104107
service2 = new ServiceConfig<>();
105108
serviceWithoutRegistryConfig = new ServiceConfig<>();
@@ -165,7 +168,10 @@ public void setUp() throws Exception {
165168
}
166169

167170
@AfterEach
168-
public void tearDown() {}
171+
public void tearDown() {
172+
SysProps.clear();
173+
DubboBootstrap.reset();
174+
}
169175

170176
@Test
171177
void testExport() throws Exception {

0 commit comments

Comments
 (0)