Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2010-11-30 17:36:00 +0000
committerChris Goldthorpe2010-11-30 17:36:00 +0000
commit26d20074129978f5d99c94828a2a04d76ebd4d07 (patch)
tree00d17ca49b42cce7dc5196aebeb94c489f9c8bcd /org.eclipse.ua.tests/help/org
parent2b877616a7fd4f7d03f1269d4313da74da3c2be1 (diff)
downloadeclipse.platform.ua-26d20074129978f5d99c94828a2a04d76ebd4d07.tar.gz
eclipse.platform.ua-26d20074129978f5d99c94828a2a04d76ebd4d07.tar.xz
eclipse.platform.ua-26d20074129978f5d99c94828a2a04d76ebd4d07.zip
Bug 331395 - [Test] Compile warning in official build
Diffstat (limited to 'org.eclipse.ua.tests/help/org')
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HelpServerBinding.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HelpServerBinding.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HelpServerBinding.java
index ccea38723..329c36f5f 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HelpServerBinding.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HelpServerBinding.java
@@ -30,6 +30,10 @@ import org.eclipse.help.internal.server.WebappManager;
public class HelpServerBinding extends TestCase {
private int previousMode;
+ // Tests to access the server using it's IP need to be disabled
+ // for testing in the build because a firewall can block this access
+ // To enable these tests for local testing set testUsingIP to true.
+ private final boolean testUsingIP = false;
protected void setUp() throws Exception {
previousMode = BaseHelpSystem.getMode();
@@ -55,7 +59,9 @@ public class HelpServerBinding extends TestCase {
WebappManager.stop("help");
WebappManager.start("help");
assertTrue(canAccessServer("127.0.0.1"));
- //assertTrue(canAccessServer(getHostIP()));
+ if (testUsingIP) {
+ assertTrue(canAccessServer(getHostIP()));
+ }
}
public void testWorkbenchBinding() throws Exception {
@@ -63,7 +69,9 @@ public class HelpServerBinding extends TestCase {
WebappManager.stop("help");
WebappManager.start("help");
assertTrue(canAccessServer("127.0.0.1"));
- //assertFalse(canAccessServer(getHostIP()));
+ if (testUsingIP) {
+ assertFalse(canAccessServer(getHostIP()));
+ }
}
public void testStandaloneBinding() throws Exception {
@@ -71,7 +79,9 @@ public class HelpServerBinding extends TestCase {
WebappManager.stop("help");
WebappManager.start("help");
assertTrue(canAccessServer("127.0.0.1"));
- //assertTrue(canAccessServer(getHostIP()));
+ if (testUsingIP) {
+ assertTrue(canAccessServer(getHostIP()));
+ }
}
private boolean canAccessServer(String host) throws Exception {

Back to the top