Search in sources :

Example 1 with NarayanaLRAClient

use of io.narayana.lra.client.NarayanaLRAClient in project narayana by jbosstm.

the class SpecTest method setupClass.

@BeforeClass
public static void setupClass() throws Exception {
    System.out.println("Getting ready to connect - waiting for coordinator to startup...");
    int servicePort = Integer.getInteger("service.http.port", TEST_SWARM_PORT);
    int rcPort = Integer.getInteger("lra.http.port", COORDINATOR_SWARM_PORT);
    String rcHost = System.getProperty("lra.http.host", "localhost");
    MICRSERVICE_BASE_URL = new URL("http://localhost:" + servicePort);
    // setting up the client
    lraClient = new NarayanaLRAClient(rcHost, rcPort);
    msClient = ClientBuilder.newClient();
}
Also used : NarayanaLRAClient(io.narayana.lra.client.NarayanaLRAClient) URL(java.net.URL) BeforeClass(org.junit.BeforeClass)

Example 2 with NarayanaLRAClient

use of io.narayana.lra.client.NarayanaLRAClient in project narayana by jbosstm.

the class SpecIT method setupClass.

@BeforeClass
public static void setupClass() throws Exception {
    if (Boolean.valueOf(System.getProperty("enablePause", "true"))) {
        System.out.println("Getting ready to connect - expecting swarm lra coordinator is already up...");
        Thread.sleep(1000);
    }
    int servicePort = Integer.getInteger("service.http.port", TEST_SWARM_PORT);
    String rcHost = System.getProperty("lra.http.host", "localhost");
    int rcPort = Integer.getInteger("lra.http.port", COORDINATOR_SWARM_PORT);
    MICRSERVICE_BASE_URL = new URL(String.format("http://localhost:%d", servicePort));
    RC_BASE_URL = new URL(String.format("http://%s:%d", rcHost, rcPort));
    // setting up the client
    lraClient = new NarayanaLRAClient(rcHost, rcPort);
    msClient = ClientBuilder.newClient();
    rcClient = ClientBuilder.newClient();
    oldLRAs = new ArrayList<>();
}
Also used : NarayanaLRAClient(io.narayana.lra.client.NarayanaLRAClient) URL(java.net.URL) BeforeClass(org.junit.BeforeClass)

Example 3 with NarayanaLRAClient

use of io.narayana.lra.client.NarayanaLRAClient in project narayana by jbosstm.

the class LRASmokeIT method setupClass.

@Before
public void setupClass() throws MalformedURLException, URISyntaxException {
    System.out.println(String.format("LRA client is connecting to %s://%s:%s", base.getProtocol(), base.getHost(), base.getPort()));
    lraClient = new NarayanaLRAClient(base.getProtocol(), base.getHost(), base.getPort());
}
Also used : NarayanaLRAClient(io.narayana.lra.client.NarayanaLRAClient) Before(org.junit.Before)

Aggregations

NarayanaLRAClient (io.narayana.lra.client.NarayanaLRAClient)3 URL (java.net.URL)2 BeforeClass (org.junit.BeforeClass)2 Before (org.junit.Before)1