com.google.apphosting.api.ApiProxy.ApiDeadlineExceededException Java Examples

The following examples show how to use com.google.apphosting.api.ApiProxy.ApiDeadlineExceededException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AppIdenityOauthTest.java    From appengine-gcs-client with Apache License 2.0 5 votes vote down vote up
@Override
protected String getToken() {
  if (numToFail <= 0) {
    return "";
  } else {
    numToFail--;
    throw new ApiDeadlineExceededException(null, null);
  }
}
 
Example #2
Source File: ConfigTest.java    From appengine-tck with Apache License 2.0 5 votes vote down vote up
@Test(expected = ApiDeadlineExceededException.class)
public void testDeadlineConfig() {
    DatastoreServiceConfig config = DatastoreServiceConfig.Builder.withDeadline(0.00001);
    DatastoreService ds = DatastoreServiceFactory.getDatastoreService(config);
    assertNotNull(ds);
    Entity g1 = new Entity("test");
    g1.setProperty("deadline", "0.00001");
    ds.put(g1);
}