Skip to content
This repository has been archived by the owner on Jun 3, 2019. It is now read-only.

Commit

Permalink
JBTM-2296. Modified test to try JacORB NS and Narayana JTS Dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
gytis committed Jan 19, 2015
1 parent 73c0bb1 commit 0b3bd93
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ArjunaJTS/jts/src/test/resources/jbossts-properties.xml
@@ -1,4 +1,6 @@
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="CoreEnvironmentBean.nodeIdentifier">1</entry>
<entry key="OrbPortabilityEnvironmentBean.bindMechanism">NAME_SERVICE</entry>
<entry key="OrbPortabilityEnvironmentBean.resolveService">NAME_SERVICE</entry>
</properties>
Expand Up @@ -44,6 +44,8 @@
import com.arjuna.orbportability.RootOA;
import com.arjuna.orbportability.Services;

import java.util.Properties;

public class TMTest
{
public static void main (String[] args) throws Exception
Expand All @@ -52,7 +54,17 @@ public static void main (String[] args) throws Exception

theTest.test();
}


/**
* Modified test to run with Docker images.
*
* Instructions:
* Follow instructions of scripts/docker/jacorb-name-server/readme.md
* Follow instructions of scripts/docker/jts/readme.md
* Execute: mvn clean test -Dtest=TMTest -Didlj-disabled=true from ArjunaJTS/jts directory replacing 172.17.42.1:9999 with name server's IP and PORT
*
* @throws Exception
*/
@Test
public void test() throws Exception
{
Expand All @@ -62,7 +74,10 @@ public void test() throws Exception
myORB = ORB.getInstance("test");
myOA = OA.getRootOA(myORB);

myORB.initORB(new String[] {}, null);
final Properties p = new Properties();
p.put("ORBInitRef.NameService", "corbaloc::172.17.42.1:9999/StandardNS/NameServer-POA/_root");

myORB.initORB(new String[] {}, p);
myOA.initOA();

ORBManager.setORB(myORB);
Expand Down

0 comments on commit 0b3bd93

Please sign in to comment.