Search in sources :

Example 1 with NavajoReactiveJettyClient

use of com.dexels.navajo.client.stream.jetty.NavajoReactiveJettyClient in project navajo by Dexels.

the class ITJettyClient method testNavajoClientForReal.

@Test
public void testNavajoClientForReal() throws Exception {
    NavajoReactiveJettyClient client = new NavajoReactiveJettyClient(uri, username, password, false);
    int size = client.call("vla/authorization/InitLoginSystemUser", "", Flowable.empty()).lift(StreamDocument.serialize()).reduce(new AtomicInteger(), (acc, i) -> {
        acc.addAndGet(i.length);
        return acc;
    }).blockingGet().get();
    logger.info("size: {}", size);
    Assert.assertTrue(size > 5000);
    client.close();
}
Also used : NavajoReactiveJettyClient(com.dexels.navajo.client.stream.jetty.NavajoReactiveJettyClient) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Test(org.junit.Test)

Aggregations

NavajoReactiveJettyClient (com.dexels.navajo.client.stream.jetty.NavajoReactiveJettyClient)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 Test (org.junit.Test)1