Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2005-03-30 15:42:57 -0500
committerMichael Valenta2005-03-30 15:42:57 -0500
commite78252d7cf82dfd0cac30f47afeae0647f44ed6e (patch)
treecc99a3c74ee15f2378c7aff78fc4eb172ccf93a1
parent1659f4f0a1ebf8ed9fddfec8ee2bf3f08565cbd6 (diff)
downloadeclipse.platform.team-e78252d7cf82dfd0cac30f47afeae0647f44ed6e.tar.gz
eclipse.platform.team-e78252d7cf82dfd0cac30f47afeae0647f44ed6e.tar.xz
eclipse.platform.team-e78252d7cf82dfd0cac30f47afeae0647f44ed6e.zip
Updated tests to allow 3.0 Baseline
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/launchConfigurations/Performance - SyncTests.launch18
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/plugin.xml7
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PerspectiveFactory.java16
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTest.java14
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkUtils.java2
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SyncTests.java2
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/WorkflowTests.java1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/test.xml7
8 files changed, 56 insertions, 11 deletions
diff --git a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/Performance - SyncTests.launch b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/Performance - SyncTests.launch
index ce1218925..f2c0a224b 100644
--- a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/Performance - SyncTests.launch
+++ b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/Performance - SyncTests.launch
@@ -1,26 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<booleanAttribute key="clearws" value="true"/>
<stringAttribute key="bootstrap" value=""/>
<booleanAttribute key="useProduct" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests"/>
<booleanAttribute key="tracing" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="includeFragments" value="false"/>
+<booleanAttribute key="clearws" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests"/>
<stringAttribute key="location1" value="C:\Eclipse\Latest\eclipse-0924\runtime-test-workspace"/>
-<booleanAttribute key="default" value="true"/>
<stringAttribute key="vmargs" value="-Declipse.cvs.properties=c:\eclipse\repository.properties -DInternalPrintPerformanceResults"/>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="default" value="true"/>
<booleanAttribute key="clearConfig" value="false"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
<stringAttribute key="progargs" value="-os win32 -ws win32 -arch x86 -nl en_US -clean"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<booleanAttribute key="automaticAdd" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.team.tests.cvs.core"/>
-<stringAttribute key="checked" value="[NONE]"/>
<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="includeFragments" value="false"/>
+<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location0" value="C:\Eclipse\Latest\eclipse-0924\runtime-test-workspace"/>
</launchConfiguration>
diff --git a/tests/org.eclipse.team.tests.cvs.core/plugin.xml b/tests/org.eclipse.team.tests.cvs.core/plugin.xml
index fbe7043c4..3d082a077 100644
--- a/tests/org.eclipse.team.tests.cvs.core/plugin.xml
+++ b/tests/org.eclipse.team.tests.cvs.core/plugin.xml
@@ -136,4 +136,11 @@
primary="true">
</toc>
</extension>
+ <extension
+ point="org.eclipse.ui.perspectives">
+ <perspective
+ class="org.eclipse.team.tests.ccvs.ui.PerspectiveFactory"
+ id="org.eclipse.team.tests.cvs.ui.perspective1"
+ name="CVS Test Perspective"/>
+ </extension>
</plugin>
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PerspectiveFactory.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PerspectiveFactory.java
new file mode 100644
index 000000000..d8cd31279
--- /dev/null
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PerspectiveFactory.java
@@ -0,0 +1,16 @@
+package org.eclipse.team.tests.ccvs.ui;
+
+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+
+public class PerspectiveFactory implements IPerspectiveFactory {
+
+ public void createInitialLayout(IPageLayout layout) {
+ String editorArea = layout.getEditorArea();
+ IFolderLayout top =
+ layout.createFolder("top", IPageLayout.LEFT, 0.40f, editorArea); //$NON-NLS-1$
+ layout.setEditorAreaVisible(true);
+ }
+
+}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTest.java
index 87521c97a..95b029f1c 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTest.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTest.java
@@ -29,6 +29,9 @@ import org.eclipse.team.tests.ccvs.ui.SynchronizeViewTestAdapter;
import org.eclipse.test.performance.*;
import org.eclipse.test.performance.Performance;
import org.eclipse.test.performance.PerformanceMeter;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.WorkbenchException;
+import org.eclipse.ui.internal.CloseAllPerspectivesAction;
/**
* Benchmark test superclass
@@ -185,7 +188,7 @@ public abstract class BenchmarkTest extends EclipseTest {
*/
protected void syncCommitResources(IResource[] resources, String comment) throws TeamException, CoreException {
startTask("Synchronize outgoing changes");
- syncResources(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber(), resources);
+ syncResources(getSyncInfoSource().createWorkspaceSubscriber(), resources);
endTask();
// TODO: Commit all outgoing changes that are children of the given resource
// by extracting them from the subscriber sync set
@@ -200,7 +203,7 @@ public abstract class BenchmarkTest extends EclipseTest {
*/
protected void syncUpdateResources(IResource[] resources) throws TeamException {
startTask("Synchronize incoming changes");
- syncResources(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber(), resources);
+ syncResources(getSyncInfoSource().createWorkspaceSubscriber(), resources);
endTask();
// TODO: Update all incoming changes that are children of the given resource
// by extracting them from the subscriber sync set
@@ -208,6 +211,13 @@ public abstract class BenchmarkTest extends EclipseTest {
updateResources(resources, false);
endTask();
}
+
+ protected void openEmptyPerspective() throws WorkbenchException {
+ // First close any open perspectives
+ new CloseAllPerspectivesAction(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+ // Now open our empty perspective
+ PlatformUI.getWorkbench().showPerspective("org.eclipse.team.tests.cvs.ui.perspective1", PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+ }
/**
* @return
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkUtils.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkUtils.java
index c044ce9a0..62549ad4b 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkUtils.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkUtils.java
@@ -146,7 +146,7 @@ public class BenchmarkUtils {
writeRandomText(gen, os, fileSize);
}
IFile file = parent.getFile(new Path(fileName));
- file.create(new ByteArrayInputStream(os.toByteArray()), true, null);
+ file.create(new ByteArrayInputStream(os.toByteArray()), true, new NullProgressMonitor());
os.close();
return file;
}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SyncTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SyncTests.java
index c6eea2899..5dc2c4322 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SyncTests.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SyncTests.java
@@ -12,6 +12,7 @@ package org.eclipse.team.tests.ccvs.ui.benchmark;
import junit.framework.Test;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -60,6 +61,7 @@ public class SyncTests extends BenchmarkTest {
* A parallel project is used to generate incoming changes.
*/
protected void runTestSync(int size, String globalName, boolean global) throws Exception {
+ openEmptyPerspective();
setupGroups(PERFORMANCE_GROUPS, globalName, global);
for (int i = 0; i < BenchmarkTestSetup.LOOP_COUNT; i++) {
final SequenceGenerator gen = new SequenceGenerator();
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/WorkflowTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/WorkflowTests.java
index 25d4f3681..71dacaa33 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/WorkflowTests.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/WorkflowTests.java
@@ -62,6 +62,7 @@ public class WorkflowTests extends BenchmarkTest {
* Runs a series of incoming and outgoing workflow-related tests.
*/
protected void runWorkflowTests(String name, File initialContents, String globalName, int loopCount, boolean global) throws Exception {
+ openEmptyPerspective();
setupGroups(PERFORMANCE_GROUPS, globalName, global);
for (int i = 0; i < loopCount; i++) {
final SequenceGenerator gen = new SequenceGenerator();
diff --git a/tests/org.eclipse.team.tests.cvs.core/test.xml b/tests/org.eclipse.team.tests.cvs.core/test.xml
index fe399cec0..353e78ce0 100644
--- a/tests/org.eclipse.team.tests.cvs.core/test.xml
+++ b/tests/org.eclipse.team.tests.cvs.core/test.xml
@@ -56,6 +56,13 @@
<property name="data-dir" value="${cvs-performance-folder}"/>
<property name="plugin-name" value="org.eclipse.team.tests.cvs.core"/>
<property name="classname"
+ value="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests"/>
+ </ant>
+ <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="vmargs" value="-Declipse.cvs.properties=${team-home}/repository.properties -Declipse.cvs.loopCount=5"/>
+ <property name="data-dir" value="${cvs-performance-folder}"/>
+ <property name="plugin-name" value="org.eclipse.team.tests.cvs.core"/>
+ <property name="classname"
value="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests"/>
</ant>
</target>

Back to the top