diff options
author | Matthias Sohn | 2013-08-22 20:22:37 +0000 |
---|---|---|
committer | Matthias Sohn | 2013-08-22 20:22:37 +0000 |
commit | 32305d6f5104a2c391e57a983031ce4e895a0405 (patch) | |
tree | b4c95c243c60491719d5e866a7b31bc8ce29f256 /org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common | |
parent | e16f5999fcf0df3e0c5ecda7cd8dd31c9a5fac1a (diff) | |
parent | 84bfabd5655949f87b894d5ca9690bb2c93f16bb (diff) | |
download | egit-32305d6f5104a2c391e57a983031ce4e895a0405.tar.gz egit-32305d6f5104a2c391e57a983031ce4e895a0405.tar.xz egit-32305d6f5104a2c391e57a983031ce4e895a0405.zip |
Merge branch 'stable-3.0'
* stable-3.0:
Be more strict in LinkedResourcesTest
Fix instability in GitRepositoriesViewTest
Fix instability in GitRepositoriesViewRepoHandlingTest
Fix instability in GitRepositoriesViewBranchHandlingTest
Fix instability in CreatePatchActionTest
Fix instability in CommitActionTest
Ensure that concurrent test runs don't use the same directory
Allow to configure custom test directory
Allow to inject JVM options for tests run from Maven
Cleanup directories created by GitMoveDeleteHookTest
Prepare 3.0.2-SNAPSHOT builds
Change-Id: I0cf763ef93e27fedc876dcbc19863a482bce3f44
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common')
-rw-r--r-- | org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/CreatePatchWizard.java | 11 | ||||
-rw-r--r-- | org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/LocalRepositoryTestCase.java | 9 |
2 files changed, 15 insertions, 5 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/CreatePatchWizard.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/CreatePatchWizard.java index 8f4c2b2a34..3651b68bf8 100644 --- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/CreatePatchWizard.java +++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/CreatePatchWizard.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (C) 2012, IBM Corporation and others. + * Copyright (C) 2012, 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 @@ -8,9 +8,11 @@ *******************************************************************************/ package org.eclipse.egit.ui.common; +import org.eclipse.egit.core.internal.CoreText; import org.eclipse.egit.ui.test.ContextMenuHelper; import org.eclipse.egit.ui.test.TestUtil; import org.eclipse.egit.ui.test.team.actions.LocationPage; +import org.eclipse.egit.ui.test.team.actions.OptionsPage; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot; import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell; @@ -57,6 +59,13 @@ public class CreatePatchWizard { shell.bot().button(IDialogConstants.FINISH_LABEL).click(); } + public void finishWithNoneFormat() { + LocationPage locationPage = getLocationPage(); + OptionsPage optionsPage = locationPage.nextToOptionsPage(); + optionsPage.setFormat(CoreText.DiffHeaderFormat_None); + finish(); + } + public void close() { shell.close(); } diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/LocalRepositoryTestCase.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/LocalRepositoryTestCase.java index f1c8abc0cb..3d5d389121 100644 --- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/LocalRepositoryTestCase.java +++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/LocalRepositoryTestCase.java @@ -38,6 +38,7 @@ import org.eclipse.egit.core.op.CloneOperation; import org.eclipse.egit.core.op.CommitOperation; import org.eclipse.egit.core.op.ConnectProviderOperation; import org.eclipse.egit.core.op.ListRemoteOperation; +import org.eclipse.egit.core.test.TestUtils; import org.eclipse.egit.ui.UIPreferences; import org.eclipse.egit.ui.internal.push.PushOperationUI; import org.eclipse.egit.ui.test.ContextMenuHelper; @@ -52,7 +53,6 @@ import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.RepositoryBuilder; import org.eclipse.jgit.storage.file.FileRepositoryBuilder; import org.eclipse.jgit.transport.URIish; -import org.eclipse.jgit.util.FS; import org.eclipse.jgit.util.FileUtils; import org.eclipse.jgit.util.IO; import org.eclipse.swt.SWT; @@ -125,6 +125,8 @@ public abstract class LocalRepositoryTestCase extends EGitTestCase { protected static final String FOLDER = "folder"; + protected static TestUtils testUtils = new TestUtils(); + public static File getTestDirectory() { return testDirectory; } @@ -132,9 +134,8 @@ public abstract class LocalRepositoryTestCase extends EGitTestCase { @BeforeClass public static void beforeClassBase() throws Exception { deleteAllProjects(); - // create our temporary directory in the user space - File userHome = FS.DETECTED.userHome(); - testDirectory = new File(userHome, "LocalRepositoriesTests"); + // create standalone temporary directory + testDirectory = testUtils.createTempDir("LocalRepositoriesTests"); if (testDirectory.exists()) FileUtils.delete(testDirectory, FileUtils.RECURSIVE | FileUtils.RETRY); |