Source:
<code>public void testEditFile() throws CoreException, IOException, InterruptedException { createSimpleProject("TestProject"); assertTrue(projectExists("TestProject")); IFile testFile1 = createEmptyFileInProject("TestFile1", "TestProject"); IFile testFile2 = createEmptyFileInProject("TestFile2", "TestProject"); assertTrue(SelectionView.getOpenedView().getSelection().isEmpty()); SelectionView.getOpenedView().dropToSelection(testFile1); SelectionView.getOpenedView().dropToSelection(testFile2); assertFalse(thereIsATraceBetween(testFile1, testFile2)); createTraceForCurrentSelectionOfType(GenericTraceMetaModelPackage.eINSTANCE.getRelatedTo()); assertTrue(thereIsATraceBetween(testFile1, testFile2)); IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IMarker[] markers = root.findMarkers(TestHelper.CAPRA_PROBLEM_MARKER_ID, true, IResource.DEPTH_INFINITE); int currMarkersSize = markers.length; testFile1.appendContents(new ByteArrayInputStream("\nhello again 1!".getBytes()), true, true, new NullProgressMonitor()); <START> TimeUnit.MILLISECONDS.sleep(100); <END> markers = root.findMarkers(TestHelper.CAPRA_PROBLEM_MARKER_ID, true, IResource.DEPTH_INFINITE); assertEquals(currMarkersSize + 1, markers.length); currMarkersSize = markers.length; testFile2.appendContents(new ByteArrayInputStream("\nhello again 2!".getBytes()), true, true, new NullProgressMonitor()); TimeUnit.MILLISECONDS.sleep(100); markers = root.findMarkers(TestHelper.CAPRA_PROBLEM_MARKER_ID, true, IResource.DEPTH_INFINITE); assertEquals(currMarkersSize + 1, markers.length); }</code><technical_language>I increase this atleast 300 avoid build failing server is slow</technical_language>

Target:
public void testEditFile() throws CoreException, IOException, InterruptedException { createSimpleProject("TestProject"); assertTrue(projectExists("TestProject")); IFile testFile1 = createEmptyFileInProject("TestFile1", "TestProject"); IFile testFile2 = createEmptyFileInProject("TestFile2", "TestProject"); assertTrue(SelectionView.getOpenedView().getSelection().isEmpty()); SelectionView.getOpenedView().dropToSelection(testFile1); SelectionView.getOpenedView().dropToSelection(testFile2); assertFalse(thereIsATraceBetween(testFile1, testFile2)); createTraceForCurrentSelectionOfType(GenericTraceMetaModelPackage.eINSTANCE.getRelatedTo()); assertTrue(thereIsATraceBetween(testFile1, testFile2)); IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IMarker[] markers = root.findMarkers(TestHelper.CAPRA_PROBLEM_MARKER_ID, true, IResource.DEPTH_INFINITE); int currMarkersSize = markers.length; testFile1.appendContents(new ByteArrayInputStream("\nhello again 1!".getBytes()), true, true, new NullProgressMonitor()); TimeUnit.MILLISECONDS.sleep(300); markers = root.findMarkers(TestHelper.CAPRA_PROBLEM_MARKER_ID, true, IResource.DEPTH_INFINITE); assertEquals(currMarkersSize + 1, markers.length); currMarkersSize = markers.length; testFile2.appendContents(new ByteArrayInputStream("\nhello again 2!".getBytes()), true, true, new NullProgressMonitor()); TimeUnit.MILLISECONDS.sleep(300); markers = root.findMarkers(TestHelper.CAPRA_PROBLEM_MARKER_ID, true, IResource.DEPTH_INFINITE); assertEquals(currMarkersSize + 1, markers.length); }