use of com.github.ambry.protocol.AdminRequestOrResponseType in project ambry by linkedin.
the class AmbryRequestsTest method controlRequestSuccessTest.
/**
* Tests that {@link AdminRequestOrResponseType#RequestControl} works correctly.
* @throws InterruptedException
* @throws IOException
*/
@Test
public void controlRequestSuccessTest() throws InterruptedException, IOException {
RequestOrResponseType[] requestOrResponseTypes = { RequestOrResponseType.PutRequest, RequestOrResponseType.DeleteRequest, RequestOrResponseType.GetRequest, RequestOrResponseType.ReplicaMetadataRequest };
for (RequestOrResponseType requestType : requestOrResponseTypes) {
List<? extends PartitionId> partitionIds = clusterMap.getWritablePartitionIds();
for (PartitionId id : partitionIds) {
doRequestControlRequestTest(requestType, id);
}
doRequestControlRequestTest(requestType, null);
}
}
use of com.github.ambry.protocol.AdminRequestOrResponseType in project ambry by linkedin.
the class AmbryServerRequestsTest method controlRequestSuccessTest.
/**
* Tests that {@link AdminRequestOrResponseType#RequestControl} works correctly.
* @throws InterruptedException
* @throws IOException
*/
@Test
public void controlRequestSuccessTest() throws InterruptedException, IOException {
RequestOrResponseType[] requestOrResponseTypes = { RequestOrResponseType.PutRequest, RequestOrResponseType.DeleteRequest, RequestOrResponseType.GetRequest, RequestOrResponseType.ReplicaMetadataRequest, RequestOrResponseType.TtlUpdateRequest, RequestOrResponseType.UndeleteRequest };
for (RequestOrResponseType requestType : requestOrResponseTypes) {
List<? extends PartitionId> partitionIds = clusterMap.getWritablePartitionIds(DEFAULT_PARTITION_CLASS);
for (PartitionId id : partitionIds) {
doRequestControlRequestTest(requestType, id);
}
doRequestControlRequestTest(requestType, null);
}
}
Aggregations