Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2013-08-20 04:14:22 -0400
committerDani Megert2013-08-20 04:14:22 -0400
commite6a1905db24cab6c6c14c6675381c8db17e36169 (patch)
tree53e0442833f6ccdefcbd0e1bd0723621c802ebb5
parente3f1015cbf3a5312084ad2aa4ded2deebfb69269 (diff)
downloadeclipse.platform.team-e6a1905db24cab6c6c14c6675381c8db17e36169.tar.gz
eclipse.platform.team-e6a1905db24cab6c6c14c6675381c8db17e36169.tar.xz
eclipse.platform.team-e6a1905db24cab6c6c14c6675381c8db17e36169.zip
Introduced TeamCVSTestPlugin.IS_UNSTABLE_TESTI20130827-0800I20130820-0800
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TeamCVSTestPlugin.java5
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java44
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/AllTestsProvider.java4
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/IsModifiedTests.java26
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSWorkspaceSubscriberTest.java34
5 files changed, 63 insertions, 50 deletions
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TeamCVSTestPlugin.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TeamCVSTestPlugin.java
index 7a541f1ab..70e8ca0bd 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TeamCVSTestPlugin.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TeamCVSTestPlugin.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -14,8 +14,11 @@ import org.eclipse.core.runtime.Plugin;
public class TeamCVSTestPlugin extends Plugin {
+ public static final boolean IS_UNSTABLE_TEST = true;
+
private static TeamCVSTestPlugin fgPlugin;
+
public TeamCVSTestPlugin() {
fgPlugin = this;
}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java
index d032c718b..98d50eb2f 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java
@@ -24,24 +24,6 @@ import java.util.Set;
import junit.framework.Test;
-import org.eclipse.core.internal.resources.mapping.SimpleResourceMapping;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.resources.mapping.RemoteResourceMappingContext;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceMappingContext;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-
-import org.eclipse.jface.util.Util;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-
import org.eclipse.osgi.util.NLS;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.TeamStatus;
@@ -73,6 +55,25 @@ import org.eclipse.team.internal.core.ResourceVariantCache;
import org.eclipse.team.internal.core.ResourceVariantCacheEntry;
import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
import org.eclipse.team.tests.ccvs.core.EclipseTest;
+import org.eclipse.team.tests.ccvs.core.TeamCVSTestPlugin;
+
+import org.eclipse.core.internal.resources.mapping.SimpleResourceMapping;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.resources.mapping.RemoteResourceMappingContext;
+import org.eclipse.core.resources.mapping.ResourceMapping;
+import org.eclipse.core.resources.mapping.ResourceMappingContext;
+import org.eclipse.core.resources.mapping.ResourceTraversal;
+
+import org.eclipse.jface.util.Util;
/**
* Tests for using CVS operations with deep and shallow resource mappings.
@@ -80,9 +81,6 @@ import org.eclipse.team.tests.ccvs.core.EclipseTest;
public class ResourceMapperTests extends EclipseTest {
- private static final boolean IS_UNSTABLE= true;
-
-
public ResourceMapperTests() {
super();
}
@@ -585,7 +583,7 @@ public class ResourceMapperTests extends EclipseTest {
}
public void testCommit() throws Exception {
- if (IS_UNSTABLE && Util.isMac())
+ if (TeamCVSTestPlugin.IS_UNSTABLE_TEST && Util.isMac())
return;
// Create a test project, import it into cvs and check it out
@@ -627,7 +625,7 @@ public class ResourceMapperTests extends EclipseTest {
public void testBranch() throws Exception {
- if (IS_UNSTABLE)
+ if (TeamCVSTestPlugin.IS_UNSTABLE_TEST)
return;
// Create a test project, import it into cvs and check it out
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/AllTestsProvider.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/AllTestsProvider.java
index f69655ddb..b1396dff0 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/AllTestsProvider.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/AllTestsProvider.java
@@ -14,6 +14,7 @@ import junit.framework.TestSuite;
import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
import org.eclipse.team.tests.ccvs.core.EclipseTest;
+import org.eclipse.team.tests.ccvs.core.TeamCVSTestPlugin;
public class AllTestsProvider extends EclipseTest {
@@ -37,7 +38,8 @@ public class AllTestsProvider extends EclipseTest {
suite.addTest(IsModifiedTests.suite());
// Disabled since they are unstable, see https://bugs.eclipse.org/409126
-// suite.addTest(RepositoryRootTest.suite());
+ if (!TeamCVSTestPlugin.IS_UNSTABLE_TEST)
+ suite.addTest(RepositoryRootTest.suite());
return new CVSTestSetup(suite);
}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/IsModifiedTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/IsModifiedTests.java
index d9539f1cb..64e30a7fa 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/IsModifiedTests.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/IsModifiedTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -21,14 +21,6 @@ import java.util.Set;
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.ICVSFile;
@@ -40,6 +32,19 @@ import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.core.util.ResourceStateChangeListeners;
import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
import org.eclipse.team.tests.ccvs.core.EclipseTest;
+import org.eclipse.team.tests.ccvs.core.TeamCVSTestPlugin;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+
+import org.eclipse.jface.util.Util;
/**
* Test isModified on file, folders and projects.
@@ -251,6 +256,9 @@ public class IsModifiedTests extends EclipseTest {
}
public void testFileDeletions() throws CoreException, TeamException {
+ if (TeamCVSTestPlugin.IS_UNSTABLE_TEST && Util.isMac())
+ return;
+
IProject project = createProject("testFileDeletions", new String[] { "changed.txt", "folder1/", "folder1/deleted.txt", "folder1/a.txt" });
// delete and commit a file
project.getFile("folder1/deleted.txt").delete(false, DEFAULT_MONITOR);
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSWorkspaceSubscriberTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSWorkspaceSubscriberTest.java
index 1d7493855..3124b3352 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSWorkspaceSubscriberTest.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSWorkspaceSubscriberTest.java
@@ -20,18 +20,6 @@ import java.util.Set;
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.util.Util;
import org.eclipse.team.core.RepositoryProvider;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.ISubscriberChangeEvent;
@@ -50,10 +38,26 @@ import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
import org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation;
import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
+import org.eclipse.team.tests.ccvs.core.TeamCVSTestPlugin;
import org.eclipse.team.tests.ccvs.core.mappings.model.ModelProject;
import org.eclipse.team.tests.ccvs.core.mappings.model.mapping.ModelResourceMapping;
import org.eclipse.team.tests.ccvs.ui.ModelParticipantSyncInfoSource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.jface.util.Util;
+
/**
* This class tests the CVSWorkspaceSubscriber
*/
@@ -1277,9 +1281,8 @@ public class CVSWorkspaceSubscriberTest extends CVSSyncSubscriberTest {
}
public void testNestedMarkAsMerged() throws CoreException, InvocationTargetException, InterruptedException {
- if (Util.isMac()) {
+ if (TeamCVSTestPlugin.IS_UNSTABLE_TEST && Util.isMac())
return; //TODO Disable test for Mac because of intermittent test failures, see https://bugs.eclipse.org/408932
- }
// Create a project and checkout a copy
IProject project = createProject(new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
@@ -1305,9 +1308,8 @@ public class CVSWorkspaceSubscriberTest extends CVSSyncSubscriberTest {
}
public void testMarkAsMergedOnBinaryFile() throws TeamException, CoreException, InvocationTargetException, InterruptedException {
- if(Util.isMac()){
+ if (TeamCVSTestPlugin.IS_UNSTABLE_TEST && Util.isMac())
return; //TODO Disable test for Mac because of intermittent test failures, see https://bugs.eclipse.org/399509
- }
// Create a project and checkout a copy
IProject project = createProject(new String[] { "file1.txt"});

Back to the top