From 8a9b3d0539ff5acb74ba07b2b8b25e23bf497514 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Wed, 16 Apr 2014 17:49:21 +0400 Subject: [PATCH] doc leak --- .../intellij/testFramework/TestSourceBasedTestCase.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/java/testFramework/src/com/intellij/testFramework/TestSourceBasedTestCase.java b/java/testFramework/src/com/intellij/testFramework/TestSourceBasedTestCase.java index 5df827f1225d..bc99f65d3c5c 100644 --- a/java/testFramework/src/com/intellij/testFramework/TestSourceBasedTestCase.java +++ b/java/testFramework/src/com/intellij/testFramework/TestSourceBasedTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ package com.intellij.testFramework; import com.intellij.ide.highlighter.ProjectFileType; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.application.ex.PathManagerEx; +import com.intellij.openapi.fileEditor.ex.FileEditorManagerEx; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.vfs.LocalFileSystem; import com.intellij.openapi.vfs.VirtualFile; @@ -52,6 +53,12 @@ import java.io.File; } + @Override + protected void tearDown() throws Exception { + FileEditorManagerEx.getInstanceEx(getProject()).closeAllFiles(); + super.tearDown(); + } + protected String getTestDataPath() { return PathManagerEx.getTestDataPath(getClass()); }