Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.List;
Expand Down Expand Up @@ -1031,6 +1032,7 @@ protected void tearDown() throws Exception {
this.debugRequestor.clearResult();
super.tearDown();
FreezeMonitor.done();
cleanWorkspaceRootMarkers();
}

/**
Expand Down Expand Up @@ -1227,4 +1229,15 @@ private static void exportComponent(IApiBaselineManager manager, IPath baselineL
exportComponent(manager, baselineLocation, currentProject, retry - 1);
}
}

private static void cleanWorkspaceRootMarkers() throws CoreException {
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IMarker[] markers = root.findMarkers(null, false, IResource.DEPTH_ZERO);
List<String> markerMessages = new ArrayList<>();
for (IMarker marker : markers) {
markerMessages.add(marker.getAttribute(IMarker.MESSAGE, "")); //$NON-NLS-1$
marker.delete();
}
assertEquals("Expected no workspace root markers at test start", Collections.EMPTY_LIST, markerMessages); //$NON-NLS-1$
}
}
Loading