use of com.netflix.eureka.cluster.TestableHttpReplicationClient.HandledRequest in project eureka by Netflix.
the class PeerEurekaNodeTest method expectSingleBatchRequest.
private ReplicationInstance expectSingleBatchRequest() throws InterruptedException {
HandledRequest handledRequest = httpReplicationClient.nextHandledRequest(30, TimeUnit.SECONDS);
assertThat(handledRequest, is(notNullValue()));
assertThat(handledRequest.getRequestType(), is(equalTo(RequestType.Batch)));
Object data = handledRequest.getData();
assertThat(data, is(instanceOf(ReplicationList.class)));
List<ReplicationInstance> replications = ((ReplicationList) data).getReplicationList();
assertThat(replications.size(), is(equalTo(1)));
return replications.get(0);
}
use of com.netflix.eureka.cluster.TestableHttpReplicationClient.HandledRequest in project eureka by Netflix.
the class PeerEurekaNodeTest method expectRequestType.
private Object expectRequestType(RequestType requestType) throws InterruptedException {
HandledRequest handledRequest = httpReplicationClient.nextHandledRequest(60, TimeUnit.SECONDS);
assertThat(handledRequest, is(notNullValue()));
assertThat(handledRequest.getRequestType(), is(equalTo(requestType)));
return handledRequest.getData();
}
Aggregations