Define default web server port for GitHub tests.

This commit is contained in:
Kirill Likhodedov
2013-07-01 17:26:16 +04:00
parent 1cf183d1bf
commit 83994dc6b8
3 changed files with 5 additions and 1 deletions
@@ -137,7 +137,6 @@ public class GitCucumberWorld {
@Before("@remote")
@Order(1)
public void setUpRemoteOperations() {
// default port will be occupied by main idea instance => define the custom default to avoid searching of free port
GitTestUtil.setDefaultBuiltInServerPort();
myHttpAuthService = (GitHttpAuthTestService)ServiceManager.getService(GitHttpAuthService.class);
}
@@ -128,6 +128,9 @@ public class GitTestUtil {
Assert.assertEquals("Notification has wrong content", expected.getContent(), actualNotification.getContent());
}
/**
* Default port will be occupied by main idea instance => define the custom default to avoid searching of free port
*/
public static void setDefaultBuiltInServerPort() {
System.setProperty(BuiltInServerManagerImpl.PROPERTY_RPC_PORT, "64463");
}
@@ -26,6 +26,7 @@ import git4idea.DialogManager;
import git4idea.Notificator;
import git4idea.config.GitVcsSettings;
import git4idea.test.GitExecutor;
import git4idea.test.GitTestUtil;
import git4idea.test.TestDialogManager;
import git4idea.test.TestNotificator;
import org.jetbrains.annotations.NotNull;
@@ -65,6 +66,7 @@ public abstract class GithubTest extends UsefulTestCase {
@SuppressWarnings({"JUnitTestCaseWithNonTrivialConstructors", "UnusedDeclaration"})
protected GithubTest() {
System.setProperty(PlatformUtilsCore.PLATFORM_PREFIX_KEY, "PlatformLangXml");
GitTestUtil.setDefaultBuiltInServerPort();
}
@Override