use of com.linkedin.r2.message.Request in project rest.li by linkedin.
the class TestComplexKeysResource method testBatchGetEntityEmpty.
@SuppressWarnings("deprecation")
public void testBatchGetEntityEmpty(BatchGetEntityRequestBuilder<ComplexResourceKey<TwoPartKey, TwoPartKey>, Message> builder) throws Exception {
final Request<BatchKVResponse<ComplexResourceKey<TwoPartKey, TwoPartKey>, EntityResponse<Message>>> request = builder.build();
final FutureCallback<RestResponse> callback = new FutureCallback<RestResponse>();
getClient().sendRestRequest(request, new RequestContext(), callback);
final RestResponse result = callback.get();
final DataMap responseMap = DataMapUtils.readMap(result);
final DataMap resultsMap = responseMap.getDataMap(BatchKVResponse.RESULTS);
Assert.assertNotNull(resultsMap, "Response does not contain results map");
Assert.assertTrue(resultsMap.isEmpty());
}
use of com.linkedin.r2.message.Request in project rest.li by linkedin.
the class TestDebugRequestHandlers method testParseqTraceDebugRequestHandlerRaw.
@Test
public void testParseqTraceDebugRequestHandlerRaw() throws URISyntaxException, ExecutionException, InterruptedException {
RestRequest request = new RestRequestBuilder(new URI(URI_PREFIX + "greetingsPromise/1/__debug/parseqtrace/raw")).setMethod("GET").build();
sendRequestAndVerifyParseqTraceRaw(request);
}
use of com.linkedin.r2.message.Request in project rest.li by linkedin.
the class TestDebugRequestHandlers method testParseqTraceDebugPutRequestHandlerTracevis.
@Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestBuilderDataProvider")
public void testParseqTraceDebugPutRequestHandlerTracevis(RootBuilderWrapper<Long, Greeting> builders) throws URISyntaxException, ExecutionException, InterruptedException, RemoteInvocationException {
Long newId = createNewGreetingOnTheServer(builders);
RestRequest request = new RestRequestBuilder(new URI(URI_PREFIX + "greetingsPromise/" + newId + "/__debug/parseqtrace/tracevis")).setMethod("PUT").setEntity(createNewGreetingBytes(newId)).build();
sendRequestAndVerifyParseqTracevisResponse(request);
}
use of com.linkedin.r2.message.Request in project rest.li by linkedin.
the class TestDebugRequestHandlers method testParseqTraceDebugPostRequestHandlerRaw.
@Test
public void testParseqTraceDebugPostRequestHandlerRaw() throws URISyntaxException, ExecutionException, InterruptedException {
RestRequest request = new RestRequestBuilder(new URI(URI_PREFIX + "greetingsPromise/__debug/parseqtrace/raw")).setMethod("POST").setEntity(createNewGreetingBytes(444L)).build();
sendRequestAndVerifyParseqTraceRaw(request);
}
use of com.linkedin.r2.message.Request in project rest.li by linkedin.
the class TestDebugRequestHandlers method testParseqTraceDebugPostRequestHandlerTracevis.
@Test
public void testParseqTraceDebugPostRequestHandlerTracevis() throws URISyntaxException, ExecutionException, InterruptedException {
RestRequest request = new RestRequestBuilder(new URI(URI_PREFIX + "greetingsPromise/__debug/parseqtrace/tracevis")).setMethod("POST").setEntity(createNewGreetingBytes(444L)).build();
sendRequestAndVerifyParseqTracevisResponse(request);
}
Aggregations