use of com.google.spanner.v1.RequestOptions in project java-spanner by googleapis.
the class AbstractReadContextTest method testBuildRequestOptions.
@Test
public void testBuildRequestOptions() {
RequestOptions requestOptions = context.buildRequestOptions(Options.fromQueryOptions());
assertEquals(RequestOptions.Priority.PRIORITY_UNSPECIFIED, requestOptions.getPriority());
}
use of com.google.spanner.v1.RequestOptions in project java-spanner by googleapis.
the class AbstractReadContextTest method testBuildRequestOptionsWithPriority.
@Test
public void testBuildRequestOptionsWithPriority() {
RequestOptions requestOptionsHighPriority = context.buildRequestOptions(Options.fromQueryOptions(Options.priority(RpcPriority.HIGH)));
assertEquals(RequestOptions.Priority.PRIORITY_HIGH, requestOptionsHighPriority.getPriority());
RequestOptions requestOptionsMediumPriority = context.buildRequestOptions(Options.fromQueryOptions(Options.priority(RpcPriority.MEDIUM)));
assertEquals(RequestOptions.Priority.PRIORITY_MEDIUM, requestOptionsMediumPriority.getPriority());
RequestOptions requestOptionsLowPriority = context.buildRequestOptions(Options.fromQueryOptions(Options.priority(RpcPriority.LOW)));
assertEquals(RequestOptions.Priority.PRIORITY_LOW, requestOptionsLowPriority.getPriority());
}
Aggregations