我正在使用 Intellij 探查器(异步探查器)在 Spring Boot Java 应用程序中运行测试。我使用分析器来调查测试暴露的可能的内存泄漏。
当我分析转储(图像取自 Eclipse MAT)时,我看到大部分内存被以下人员占用:
org.gradle.internal.remote.internal.hub.OutgoingQueue 类。
对象的类型为 org.gradle.internal.remote.internal.hub.protocol.ChannelMessage
问题是这个类是什么,为什么它会占用这么多内存?
测试本身并没有什么特别之处:
@Test
@Timeout(value = 180)
@SqlGroup({
@Sql(scripts = {
"classpath:somePathToScript.sql"},
executionPhase = BEFORE_TEST_METHOD),
@Sql(scripts = {
"classpath:classpath:pathToScript.sql"},
executionPhase = AFTER_TEST_METHOD)
})
public void test(){
List<String> accounts = repository.findAccountsBy....
for (String account: accounts) {
callApplicationLogic(account)
}
}