Search in sources :

Example 6 with RpcPriority

use of com.google.cloud.spanner.Options.RpcPriority in project java-spanner by googleapis.

the class OptionsTest method testReadOptionsPriority.

@Test
public void testReadOptionsPriority() {
    RpcPriority priority = RpcPriority.LOW;
    Options options = Options.fromReadOptions(Options.priority(priority));
    assertTrue(options.hasPriority());
    assertEquals("priority: " + priority + " ", options.toString());
}
Also used : RpcPriority(com.google.cloud.spanner.Options.RpcPriority) Test(org.junit.Test)

Example 7 with RpcPriority

use of com.google.cloud.spanner.Options.RpcPriority in project java-spanner by googleapis.

the class OptionsTest method testTransactionOptionsPriority.

@Test
public void testTransactionOptionsPriority() {
    RpcPriority priority = RpcPriority.HIGH;
    Options options = Options.fromTransactionOptions(Options.priority(priority));
    assertTrue(options.hasPriority());
    assertEquals("priority: " + priority + " ", options.toString());
}
Also used : RpcPriority(com.google.cloud.spanner.Options.RpcPriority) Test(org.junit.Test)

Aggregations

RpcPriority (com.google.cloud.spanner.Options.RpcPriority)7 Test (org.junit.Test)5 Timestamp (com.google.cloud.Timestamp)1 Pipeline (org.apache.beam.sdk.Pipeline)1