Search in sources :

Example 1 with SystemIntegrationTestSync

use of joynr.test.SystemIntegrationTestSync in project joynr by bmwcarit.

the class ConsumerRestEndpoint method callProducer.

private void callProducer(String domain, StringBuffer result) {
    try {
        DiscoveryQos discoveryQos = new DiscoveryQos();
        // 2 Minutes
        discoveryQos.setDiscoveryTimeoutMs(120000);
        SystemIntegrationTestSync proxy = serviceLocator.get(SystemIntegrationTestSync.class, domain, new MessagingQos(), discoveryQos);
        Integer additionResult = proxy.add(1, 1);
        if (additionResult != 2) {
            throw new IllegalArgumentException("1 + 1 should be 2, got: " + additionResult);
        }
        result.append("SIT RESULT success: JEE consumer -> ").append(domain);
    } catch (Exception e) {
        result.append("SIT RESULT error: JEE consumer -> ").append(domain).append("\nException: ").append(e.toString());
        addStacktrace(e, result);
    }
    result.append("\n");
}
Also used : MessagingQos(io.joynr.messaging.MessagingQos) DiscoveryQos(io.joynr.arbitration.DiscoveryQos) IOException(java.io.IOException) SystemIntegrationTestSync(joynr.test.SystemIntegrationTestSync)

Aggregations

DiscoveryQos (io.joynr.arbitration.DiscoveryQos)1 MessagingQos (io.joynr.messaging.MessagingQos)1 IOException (java.io.IOException)1 SystemIntegrationTestSync (joynr.test.SystemIntegrationTestSync)1