mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
PsiEventsTest, perforce tests: dump heap snapshots to build temp dir
This commit is contained in:
@@ -190,6 +190,7 @@ public class PsiEventsTest extends PsiTestCase {
|
||||
|
||||
PlatformTestUtil.tryGcSoftlyReachableObjects();
|
||||
|
||||
|
||||
if (((FileManagerImpl)fileManager).getCachedDirectory(myPrjDir1) != null) {
|
||||
Processor<PsiDirectory> isReallyLeak = new Processor<PsiDirectory>() {
|
||||
@Override
|
||||
@@ -200,7 +201,11 @@ public class PsiEventsTest extends PsiTestCase {
|
||||
LeakHunter.checkLeak(ApplicationManager.getApplication(), PsiDirectory.class, isReallyLeak);
|
||||
LeakHunter.checkLeak(IdeEventQueue.getInstance(), PsiDirectory.class, isReallyLeak);
|
||||
LeakHunter.checkLeak(LaterInvocator.getLaterInvocatorQueue(), PsiDirectory.class, isReallyLeak);
|
||||
MemoryDumpHelper.captureMemoryDump("testRenameFileWithoutDir.hprof");
|
||||
|
||||
String dumpPath = FileUtil.createTempFile(new File(System.getProperty("java.io.tmpdir")), "testRenameFileWithoutDir", ".hprof", false, false).getPath();
|
||||
MemoryDumpHelper.captureMemoryDump(dumpPath);
|
||||
System.out.println(dumpPath);
|
||||
|
||||
assertNull(((FileManagerImpl)fileManager).getCachedDirectory(myPrjDir1));
|
||||
fail("directory just died");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user