Search in sources :

Example 1 with DelayedReceive

use of org.apache.kafka.test.DelayedReceive in project kafka by apache.

the class NetworkClientTest method maybeSetExpectedApiVersionsResponse.

private void maybeSetExpectedApiVersionsResponse() {
    ByteBuffer buffer = ApiVersionsResponse.API_VERSIONS_RESPONSE.serialize((short) 0, new ResponseHeader(0));
    selector.delayedReceive(new DelayedReceive(node.idString(), new NetworkReceive(node.idString(), buffer)));
}
Also used : ResponseHeader(org.apache.kafka.common.requests.ResponseHeader) NetworkReceive(org.apache.kafka.common.network.NetworkReceive) DelayedReceive(org.apache.kafka.test.DelayedReceive) ByteBuffer(java.nio.ByteBuffer)

Aggregations

ByteBuffer (java.nio.ByteBuffer)1 NetworkReceive (org.apache.kafka.common.network.NetworkReceive)1 ResponseHeader (org.apache.kafka.common.requests.ResponseHeader)1 DelayedReceive (org.apache.kafka.test.DelayedReceive)1