mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-17 22:15:23 +02:00
Bug 575508: Fix flaky test
Bug_303953Test.testBuildAfterSourcefileDelete() is occasionally seen failing with an unexpected change to .cproject. I have not investigated what the change is, but it's plausible that some background process like the indexer or scanner discovery might asynchronously modify .cproject, and .cproject is not the focus of this test, so just ignore it along with .project. On the hopeful assumption that this was the only flakiness, I am removing the @Tag(BaseTestCase5.FLAKY_TEST_TAG) annotation. Change-Id: Ie9191aaf1a66e8475f05eb422d6e4b3949f8138d Signed-off-by: Christian Walther <walther@indel.ch>
This commit is contained in:
parent
eb7aa70a9f
commit
390a8d22b5
1 changed files with 2 additions and 4 deletions
|
@ -20,7 +20,6 @@ import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.testplugin.util.BaseTestCase5;
|
|
||||||
import org.eclipse.cdt.managedbuilder.testplugin.AbstractBuilderTest;
|
import org.eclipse.cdt.managedbuilder.testplugin.AbstractBuilderTest;
|
||||||
import org.eclipse.cdt.managedbuilder.testplugin.ResourceDeltaVerifier;
|
import org.eclipse.cdt.managedbuilder.testplugin.ResourceDeltaVerifier;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
|
@ -29,7 +28,6 @@ import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.resources.IResourceDelta;
|
import org.eclipse.core.resources.IResourceDelta;
|
||||||
import org.eclipse.core.resources.IncrementalProjectBuilder;
|
import org.eclipse.core.resources.IncrementalProjectBuilder;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.junit.jupiter.api.Tag;
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -39,7 +37,6 @@ import org.junit.jupiter.api.Test;
|
||||||
*/
|
*/
|
||||||
public class Bug_303953Test extends AbstractBuilderTest {
|
public class Bug_303953Test extends AbstractBuilderTest {
|
||||||
|
|
||||||
@Tag(BaseTestCase5.FLAKY_TEST_TAG)
|
|
||||||
@Test
|
@Test
|
||||||
public void testBuildAfterSourcefileDelete() throws CoreException {
|
public void testBuildAfterSourcefileDelete() throws CoreException {
|
||||||
setWorkspace("regressions");
|
setWorkspace("regressions");
|
||||||
|
@ -54,7 +51,8 @@ public class Bug_303953Test extends AbstractBuilderTest {
|
||||||
ResourceDeltaVerifier verifier = new ResourceDeltaVerifier();
|
ResourceDeltaVerifier verifier = new ResourceDeltaVerifier();
|
||||||
verifier.addExpectedChange(buildOutputResources.toArray(new IResource[buildOutputResources.size()]),
|
verifier.addExpectedChange(buildOutputResources.toArray(new IResource[buildOutputResources.size()]),
|
||||||
IResourceDelta.ADDED, IResourceDelta.NO_CHANGE);
|
IResourceDelta.ADDED, IResourceDelta.NO_CHANGE);
|
||||||
verifier.addIgnore(new IResource[] { getWorkspace().getRoot(), app, app.getFile(".project") });
|
verifier.addIgnore(
|
||||||
|
new IResource[] { getWorkspace().getRoot(), app, app.getFile(".project"), app.getFile(".cproject") });
|
||||||
verifyBuild(app, IncrementalProjectBuilder.FULL_BUILD, verifier);
|
verifyBuild(app, IncrementalProjectBuilder.FULL_BUILD, verifier);
|
||||||
|
|
||||||
// Delete helloworldC
|
// Delete helloworldC
|
||||||
|
|
Loading…
Add table
Reference in a new issue