Skip to content

Commit c8588d6

Browse files
committed
Fix ListPopulationTest leaking shell
1 parent c04dec5 commit c8588d6

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/ListPopulationTest.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.eclipse.test.performance.Performance;
2626
import org.eclipse.test.performance.PerformanceMeter;
2727
import org.eclipse.ui.tests.harness.util.CloseTestWindowsExtension;
28+
import org.junit.jupiter.api.AfterEach;
2829
import org.junit.jupiter.api.Test;
2930
import org.junit.jupiter.api.TestInfo;
3031
import org.junit.jupiter.api.extension.RegisterExtension;
@@ -40,6 +41,13 @@ public class ListPopulationTest {
4041

4142
List list;
4243

44+
@AfterEach
45+
public void tearDown() {
46+
if (list != null && !list.isDisposed()) {
47+
list.getShell().dispose();
48+
}
49+
}
50+
4351
protected void openBrowser() {
4452
Display fDisplay = Display.getCurrent();
4553
if (fDisplay == null) {
@@ -152,4 +160,4 @@ private String[] getItems(int count) {
152160
}
153161

154162

155-
}
163+
}

0 commit comments

Comments
 (0)