Пример #1
0
 /** @throws Exception */
 @Test
 public void allocateIdsAsyncWithParentKey() throws Exception {
   Key parentKey = KeyFactory.createKey("Parent", 1);
   Future<KeyRange> future = DatastoreUtil.allocateIdsAsync(ds, parentKey, "Child", 2);
   assertThat(future, is(notNullValue()));
   assertThat(future.get().getSize(), is(2L));
 }
Пример #2
0
 /** @throws Exception */
 @Test
 public void allocateIdsAsync() throws Exception {
   Future<KeyRange> future = DatastoreUtil.allocateIdsAsync(ds, "Hoge", 2);
   assertThat(future, is(notNullValue()));
   assertThat(future.get().getSize(), is(2L));
 }