Skip to content

Commit

Permalink
[PAXWICKET-182] Tried to use a different port to run tests on hudson
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Pieber <anpieber@gmail.com>
  • Loading branch information
anpieber committed Jul 7, 2011
1 parent 2114922 commit 6221f52
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import static org.ops4j.pax.exam.CoreOptions.options;
import static org.ops4j.pax.exam.CoreOptions.provision;
import static org.ops4j.pax.exam.CoreOptions.systemProperty;
import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup;
import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;

import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
Expand All @@ -31,6 +33,7 @@
@RunWith(JUnit4TestRunner.class)
public abstract class PaxWicketIntegrationTest {

protected static final String WEBUI_PORT = "9081";
protected static final String SYMBOLIC_NAME_PAX_WICKET_SERVICE = "org.ops4j.pax.wicket.pax-wicket-service";

@Configuration
Expand All @@ -44,11 +47,11 @@ public final Option[] configureProvisions() {
provision(mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.configadmin")
.versionAsInProject()),
provision(mavenBundle().groupId("org.apache.geronimo.specs").artifactId("geronimo-activation_1.1_spec")
.versionAsInProject()),
.versionAsInProject()),
provision(mavenBundle().groupId("org.apache.geronimo.specs").artifactId("geronimo-servlet_2.5_spec")
.versionAsInProject()),
provision(mavenBundle().groupId("org.apache.geronimo.specs").artifactId("geronimo-jta_1.1_spec")
.versionAsInProject()),
.versionAsInProject()),
provision(mavenBundle().groupId("org.apache.servicemix.bundles")
.artifactId("org.apache.servicemix.bundles.javax.mail").versionAsInProject()),
provision(mavenBundle().groupId("org.apache.servicemix.bundles")
Expand All @@ -73,7 +76,8 @@ public final Option[] configureProvisions() {
provision(mavenBundle().groupId("org.apache.servicemix.bundles")
.artifactId("org.apache.servicemix.bundles.cglib")
.versionAsInProject()),
systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("WARN"));
systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("WARN"),
vmOption("-Dorg.osgi.service.http.port=" + WEBUI_PORT), waitForFrameworkStartup());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,23 +77,23 @@ public final Option[] configureAdditionalProvision() {
@Test
public void testNonSpringSampleApplication_shouldAllowBaseFunctions() throws Exception {
WebClient webclient = new WebClient();
HtmlPage page = webclient.getPage("http://localhost:8080/deptStore/");
HtmlPage page = webclient.getPage("http://localhost:" + WEBUI_PORT + "/deptStore/");
assertThatAllTabsExist(page.asText());
assertTrue(page.asText().contains("Activator"));
}

@Test
public void testSpringSampleApplication_shouldAllowBaseFunctions() throws Exception {
WebClient webclient = new WebClient();
HtmlPage page = webclient.getPage("http://localhost:8080/springDeptStore/");
HtmlPage page = webclient.getPage("http://localhost:" + WEBUI_PORT + "/springDeptStore/");
assertThatAllTabsExist(page.asText());
assertTrue(page.asText().contains("Spring"));
}

@Test
public void testBlueprintSampleApplication_shouldAllowBaseFunctions() throws Exception {
WebClient webclient = new WebClient();
HtmlPage page = webclient.getPage("http://localhost:8080/blueprintDeptStore/");
HtmlPage page = webclient.getPage("http://localhost:" + WEBUI_PORT + "/blueprintDeptStore/");
assertThatAllTabsExist(page.asText());
assertTrue(page.asText().contains("Blueprint"));
}
Expand Down

0 comments on commit 6221f52

Please sign in to comment.