Search in sources :

Example 6 with EngineStats

use of io.aklivity.zilla.runtime.engine.EngineStats in project zilla by aklivity.

the class ClientStatsIT method shouldSendAndReceiveData.

@Test
@Configuration("client.host.json")
@Specification({ "${client}/client.and.server.sent.data.multiple.frames/client", "${server}/client.and.server.sent.data.multiple.frames/server" })
public void shouldSendAndReceiveData() throws Exception {
    k3po.finish();
    EngineStats stats = engine.stats("test", "app0");
    assertThat(stats.initialBytes(), equalTo(26L));
    assertThat(stats.replyBytes(), equalTo(26L));
}
Also used : EngineStats(io.aklivity.zilla.runtime.engine.EngineStats) Configuration(io.aklivity.zilla.runtime.engine.test.annotation.Configuration) Test(org.junit.Test) Specification(org.kaazing.k3po.junit.annotation.Specification)

Example 7 with EngineStats

use of io.aklivity.zilla.runtime.engine.EngineStats in project zilla by aklivity.

the class ServerStatsIT method shouldReceiveNonEmptyMessage.

@Test
@Configuration("server.when.json")
@Specification({ "${net}/non.empty/request", "${app}/non.empty/server" })
public void shouldReceiveNonEmptyMessage() throws Exception {
    k3po.finish();
    EngineStats stats = engine.stats("test", "net0");
    assertEquals(0, stats.initialBytes());
    assertEquals(19, stats.replyBytes());
// assertEquals(0, stats.initialMessages());
// assertEquals(1, stats.replyMessages());
}
Also used : EngineStats(io.aklivity.zilla.runtime.engine.EngineStats) Configuration(io.aklivity.zilla.runtime.engine.test.annotation.Configuration) Test(org.junit.Test) Specification(org.kaazing.k3po.junit.annotation.Specification)

Aggregations

EngineStats (io.aklivity.zilla.runtime.engine.EngineStats)7 Test (org.junit.Test)7 Configuration (io.aklivity.zilla.runtime.engine.test.annotation.Configuration)6 Specification (org.kaazing.k3po.junit.annotation.Specification)6 Engine (io.aklivity.zilla.runtime.engine.Engine)1 IOException (java.io.IOException)1 InetSocketAddress (java.net.InetSocketAddress)1 URL (java.net.URL)1 SocketChannel (java.nio.channels.SocketChannel)1 LinkedList (java.util.LinkedList)1