Disable pre check in MultiInstanceTest

This commit is contained in:
Albumen Kevin 2022-12-15 14:09:57 +08:00
parent 6cda325133
commit fc7f019a08
2 changed files with 4 additions and 9 deletions

View File

@ -74,7 +74,7 @@ class MultiInstanceTest {
registryConfig = new RegistryConfig(ZookeeperRegistryCenterConfig.getConnectionAddress1());
// pre-check threads
precheckUnclosedThreads();
//precheckUnclosedThreads();
}
@AfterEach
@ -82,18 +82,14 @@ class MultiInstanceTest {
FrameworkModel.destroyAll();
// check threads
checkUnclosedThreads();
//checkUnclosedThreads();
}
private static Map<Thread, StackTraceElement[]> precheckUnclosedThreads() {
private static Map<Thread, StackTraceElement[]> precheckUnclosedThreads() throws IOException {
// create a special DubboTestChecker
if (testChecker == null) {
testChecker = new DubboTestChecker();
try {
testChecker.init(null);
} catch (IOException e) {
throw new RuntimeException(e);
}
testChecker.init(null);
testClassName = MultiInstanceTest.class.getName();
}
return testChecker.checkUnclosedThreads(testClassName, 0);

View File

@ -254,7 +254,6 @@ public class DubboTestChecker implements TestExecutionListener {
.filter(thread -> !StringUtils.startsWithAny(thread.getName(),
"Reference Handler", "Finalizer", "Signal Dispatcher", "Attach Listener", "process reaper", "main" // jvm
, "surefire-forkedjvm-" // surefire plugin
, "globalEventExecutor"
))
.filter(thread -> !unclosedThreadMap.containsKey(thread))
.collect(Collectors.toList());