diff --git a/plugins/git4idea/test-stepdefs/git4idea/GitCucumberWorld.java b/plugins/git4idea/test-stepdefs/git4idea/GitCucumberWorld.java index c7932f216529..856f64f11bb8 100644 --- a/plugins/git4idea/test-stepdefs/git4idea/GitCucumberWorld.java +++ b/plugins/git4idea/test-stepdefs/git4idea/GitCucumberWorld.java @@ -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); } diff --git a/plugins/git4idea/testFramework/git4idea/test/GitTestUtil.java b/plugins/git4idea/testFramework/git4idea/test/GitTestUtil.java index cdfc44bd7608..74eec538d1cd 100644 --- a/plugins/git4idea/testFramework/git4idea/test/GitTestUtil.java +++ b/plugins/git4idea/testFramework/git4idea/test/GitTestUtil.java @@ -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"); } diff --git a/plugins/github/github-test/test/org/jetbrains/plugins/github/test/GithubTest.java b/plugins/github/github-test/test/org/jetbrains/plugins/github/test/GithubTest.java index 1c90ea791b25..5708e32130dc 100644 --- a/plugins/github/github-test/test/org/jetbrains/plugins/github/test/GithubTest.java +++ b/plugins/github/github-test/test/org/jetbrains/plugins/github/test/GithubTest.java @@ -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