Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
fix port offset affected area and dependency issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Huang committed Dec 24, 2013
1 parent c063dcb commit 06fa910
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion functional-test/pom.xml
Expand Up @@ -530,7 +530,6 @@
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
<include>META-INF/persistence.xml</include>
</includes>
</testResource>
<testResource>
Expand Down Expand Up @@ -603,6 +602,7 @@
<usedDependency>mysql:mysql-connector-java</usedDependency>
<usedDependency>org.apache.solr:solr-core</usedDependency>
<usedDependency>org.apache.solr:solr-solrj</usedDependency>
<usedDependency>org.hibernate:hibernate-entitymanager</usedDependency>
<usedDependency>org.hibernate:hibernate-testing</usedDependency>
<usedDependency>org.javassist:javassist</usedDependency>
<usedDependency>org.jboss.as:jboss-as-ejb-client-bom</usedDependency>
Expand Down
Expand Up @@ -42,7 +42,10 @@ public static String getDocumentStoragePath() {
env.put(Context.INITIAL_CONTEXT_FACTORY,
org.jboss.naming.remote.client.InitialContextFactory.class
.getName());
env.put(Context.PROVIDER_URL, "remote://localhost:4447");
long portOffset = Integer.parseInt(
PropertiesHolder.getProperty("cargo.port.offset", "0"));
long rmiPort = 4447 + portOffset;
env.put(Context.PROVIDER_URL, "remote://localhost:" + rmiPort);
InitialContext remoteContext = null;
try {
remoteContext = new InitialContext(env);
Expand Down
2 changes: 2 additions & 0 deletions functional-test/src/test/resources/setup.properties
Expand Up @@ -11,6 +11,8 @@ zanata.instance.url=${zanata.instance.url}
zanata.sample.projects.basedir=${zanata.sample.projects.basedir}
zanata.apikey=${zanata.apikey}

cargo.port.offset=${cargo.port.offset}

#persistence.xml
hibernate.connection.url=${ds.connection.url}
hibernate.connection.username=${ds.username}
Expand Down

0 comments on commit 06fa910

Please sign in to comment.