{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/comments/59652223","id":59652223,"diff_hunk":"@@ -967,25 +967,920 @@ public void testListDnsRecords() {\n   }\n \n   @Test\n-  public void testListZoneBatch() {\n-    DNS.create(ZONE1);\n-    DNS.create(ZONE_EMPTY_DESCRIPTION);\n+  public void testListZonesBatch() {\n     try {\n       DnsBatch batch = DNS.batch();\n-      DnsBatchResult<Page<Zone>> batchResult = batch.listZones();\n+      DnsBatchResult<Page<Zone>> result = batch.listZones();\n       batch.submit();\n-      assertTrue(batchResult.completed());\n-      Iterator<Zone> iteratorBatch = batchResult.get().iterateAll();\n-      Iterator<Zone> iteratorList = DNS.listZones().iterateAll();\n-      assertEquals(Iterators.size(iteratorList), Iterators.size(iteratorBatch));\n-      while (iteratorBatch.hasNext()) {\n-        assertTrue(Iterators.contains(iteratorList, iteratorBatch.next()));\n+      List<Zone> zones = filter(result.get().iterateAll());\n+      assertEquals(0, zones.size());\n+      // some zones exists\n+      Zone created = DNS.create(ZONE1);\n+      batch = DNS.batch();\n+      result = batch.listZones();\n+      batch.submit();\n+      zones = filter(result.get().iterateAll());\n+      assertEquals(created, zones.get(0));\n+      assertEquals(1, zones.size());\n+      created = DNS.create(ZONE_EMPTY_DESCRIPTION);\n+      batch = DNS.batch();\n+      result = batch.listZones();\n+      DnsBatchResult<Page<Zone>> zeroSizeError =\n+          batch.listZones(Dns.ZoneListOption.pageSize(0));\n+      DnsBatchResult<Page<Zone>> negativeSizeError =\n+          batch.listZones(Dns.ZoneListOption.pageSize(-1));\n+      DnsBatchResult<Page<Zone>> okSize = batch.listZones(Dns.ZoneListOption.pageSize(1000));\n+      DnsBatchResult<Page<Zone>> nameError = batch.listZones(Dns.ZoneListOption.dnsName(\"aaaaa\"));\n+      DnsBatchResult<Page<Zone>> okName =\n+          batch.listZones(Dns.ZoneListOption.dnsName(ZONE1.dnsName()));\n+      DnsBatchResult<Page<Zone>> idResult =\n+          batch.listZones(Dns.ZoneListOption.dnsName(ZONE1.dnsName()),\n+              Dns.ZoneListOption.fields(Dns.ZoneField.ZONE_ID));\n+      DnsBatchResult<Page<Zone>> timeResult =\n+          batch.listZones(Dns.ZoneListOption.dnsName(ZONE1.dnsName()),\n+              Dns.ZoneListOption.fields(Dns.ZoneField.CREATION_TIME));\n+      DnsBatchResult<Page<Zone>> dnsNameResult =\n+          batch.listZones(Dns.ZoneListOption.dnsName(ZONE1.dnsName()),\n+              Dns.ZoneListOption.fields(Dns.ZoneField.DNS_NAME));\n+      DnsBatchResult<Page<Zone>> descriptionResult =\n+          batch.listZones(Dns.ZoneListOption.dnsName(ZONE1.dnsName()),\n+              Dns.ZoneListOption.fields(Dns.ZoneField.DESCRIPTION));\n+      DnsBatchResult<Page<Zone>> nameServersResult =\n+          batch.listZones(Dns.ZoneListOption.dnsName(ZONE1.dnsName()),\n+              Dns.ZoneListOption.fields(Dns.ZoneField.NAME_SERVERS));\n+      DnsBatchResult<Page<Zone>> nameServerSetResult =\n+          batch.listZones(Dns.ZoneListOption.dnsName(ZONE1.dnsName()),\n+              Dns.ZoneListOption.fields(Dns.ZoneField.NAME_SERVER_SET));\n+      DnsBatchResult<Page<Zone>> combinationResult =\n+          batch.listZones(Dns.ZoneListOption.fields(Dns.ZoneField.ZONE_ID,\n+              Dns.ZoneField.DESCRIPTION),\n+              Dns.ZoneListOption.pageSize(1));\n+      batch.submit();\n+      zones = filter(result.get().iterateAll());\n+      assertEquals(2, zones.size());\n+      assertTrue(zones.contains(created));\n+      // error in options\n+      try {\n+        zeroSizeError.get();\n+        fail();\n+      } catch (DnsException ex) {\n+        // expected\n+        assertEquals(400, ex.code());\n+        assertFalse(ex.retryable());\n+      }\n+      try {\n+        negativeSizeError.get();\n+        fail();\n+      } catch (DnsException ex) {\n+        // expected\n+        assertEquals(400, ex.code());\n+        assertFalse(ex.retryable());\n+      }\n+      // ok size\n+      zones = filter(okSize.get().iterateAll());\n+      assertEquals(2, zones.size()); // we still have only 2 zones\n+      // dns name problems\n+      try {\n+        nameError.get();\n+        fail();\n+      } catch (DnsException ex) {\n+        // expected\n+        assertEquals(400, ex.code());\n+        assertFalse(ex.retryable());\n+      }\n+      // ok name\n+      zones = filter(okName.get().iterateAll());\n+      assertEquals(1, zones.size());\n+      // field options\n+      Iterator<Zone> zoneIterator = idResult.get().iterateAll();\n+      Zone zone = zoneIterator.next();\n+      assertNull(zone.creationTimeMillis());\n+      assertNotNull(zone.name());\n+      assertNull(zone.dnsName());\n+      assertNull(zone.description());\n+      assertNull(zone.nameServerSet());\n+      assertTrue(zone.nameServers().isEmpty());\n+      assertNotNull(zone.generatedId());\n+      assertFalse(zoneIterator.hasNext());\n+      zoneIterator = timeResult.get().iterateAll();\n+      zone = zoneIterator.next();\n+      assertNotNull(zone.creationTimeMillis());\n+      assertNotNull(zone.name());\n+      assertNull(zone.dnsName());\n+      assertNull(zone.description());\n+      assertNull(zone.nameServerSet());\n+      assertTrue(zone.nameServers().isEmpty());\n+      assertNull(zone.generatedId());\n+      assertFalse(zoneIterator.hasNext());\n+      zoneIterator = dnsNameResult.get().iterateAll();\n+      zone = zoneIterator.next();\n+      assertNull(zone.creationTimeMillis());\n+      assertNotNull(zone.name());\n+      assertNotNull(zone.dnsName());\n+      assertNull(zone.description());\n+      assertNull(zone.nameServerSet());\n+      assertTrue(zone.nameServers().isEmpty());\n+      assertNull(zone.generatedId());\n+      assertFalse(zoneIterator.hasNext());\n+      zoneIterator = descriptionResult.get().iterateAll();\n+      zone = zoneIterator.next();\n+      assertNull(zone.creationTimeMillis());\n+      assertNotNull(zone.name());\n+      assertNull(zone.dnsName());\n+      assertNotNull(zone.description());\n+      assertNull(zone.nameServerSet());\n+      assertTrue(zone.nameServers().isEmpty());\n+      assertNull(zone.generatedId());\n+      assertFalse(zoneIterator.hasNext());\n+      zoneIterator = nameServersResult.get().iterateAll();\n+      zone = zoneIterator.next();\n+      assertNull(zone.creationTimeMillis());\n+      assertNotNull(zone.name());\n+      assertNull(zone.dnsName());\n+      assertNull(zone.description());\n+      assertNull(zone.nameServerSet());\n+      assertFalse(zone.nameServers().isEmpty());\n+      assertNull(zone.generatedId());\n+      assertFalse(zoneIterator.hasNext());\n+      zoneIterator = nameServerSetResult.get().iterateAll();\n+      zone = zoneIterator.next();\n+      assertNull(zone.creationTimeMillis());\n+      assertNotNull(zone.name());\n+      assertNull(zone.dnsName());\n+      assertNull(zone.description());\n+      assertNull(zone.nameServerSet()); // we cannot set it using gcloud java\n+      assertTrue(zone.nameServers().isEmpty());\n+      assertNull(zone.generatedId());\n+      assertFalse(zoneIterator.hasNext());\n+      // several combined\n+      zones = filter(combinationResult.get().iterateAll());\n+      assertEquals(2, zones.size());\n+      for (Zone current : zones) {\n+        assertNull(current.creationTimeMillis());\n+        assertNotNull(current.name());\n+        assertNull(current.dnsName());\n+        assertNotNull(current.description());\n+        assertNull(current.nameServerSet());\n+        assertTrue(zone.nameServers().isEmpty());\n+        assertNotNull(current.generatedId());\n       }\n     } finally {\n       DNS.delete(ZONE1.name());\n       DNS.delete(ZONE_EMPTY_DESCRIPTION.name());\n     }\n   }\n \n-  // todo(mderka) implement tests for other batch calls, issue #874\n+  @Test\n+  public void testCreateValidZoneBatch() {\n+    try {\n+      DnsBatch batch = DNS.batch();\n+      DnsBatchResult<Zone> completeZoneResult = batch.createZone(ZONE1);\n+      DnsBatchResult<Zone> partialZoneResult = batch.createZone(ZONE_EMPTY_DESCRIPTION);\n+      batch.submit();\n+      Zone created = completeZoneResult.get();\n+      assertEquals(ZONE1.description(), created.description());\n+      assertEquals(ZONE1.dnsName(), created.dnsName());\n+      assertEquals(ZONE1.name(), created.name());\n+      assertNotNull(created.creationTimeMillis());\n+      assertNotNull(created.nameServers());\n+      assertNull(created.nameServerSet());\n+      assertNotNull(created.generatedId());\n+      Zone retrieved = DNS.getZone(ZONE1.name());\n+      assertEquals(created, retrieved);\n+      created = partialZoneResult.get();\n+      assertEquals(ZONE_EMPTY_DESCRIPTION.description(), created.description());\n+      assertEquals(ZONE_EMPTY_DESCRIPTION.dnsName(), created.dnsName());\n+      assertEquals(ZONE_EMPTY_DESCRIPTION.name(), created.name());\n+      assertNotNull(created.creationTimeMillis());\n+      assertNotNull(created.nameServers());\n+      assertNull(created.nameServerSet());\n+      assertNotNull(created.generatedId());\n+      retrieved = DNS.getZone(ZONE_EMPTY_DESCRIPTION.name());\n+      assertEquals(created, retrieved);\n+    } finally {\n+      DNS.delete(ZONE1.name());\n+      DNS.delete(ZONE_EMPTY_DESCRIPTION.name());\n+    }\n+  }\n+\n+  @Test\n+  public void testCreateZoneWithErrorsBatch() {\n+    try {\n+      DnsBatch batch = DNS.batch();\n+      DnsBatchResult<Zone> nameErrorResult = batch.createZone(ZONE_NAME_ERROR);\n+      DnsBatchResult<Zone> noPeriodResult = batch.createZone(ZONE_DNS_NO_PERIOD);\n+      batch.submit();\n+      try {\n+        nameErrorResult.get();\n+        fail(\"Zone name is missing a period. The service returns an error.\");\n+      } catch (DnsException ex) {\n+        // expected\n+        assertFalse(ex.retryable());\n+      }\n+      try {\n+        noPeriodResult.get();\n+        fail(\"Zone name is missing a period. The service returns an error.\");\n+      } catch (DnsException ex) {\n+        // expected\n+        assertFalse(ex.retryable());\n+      }\n+    } finally {\n+      DNS.delete(ZONE_NAME_ERROR.name());\n+      DNS.delete(ZONE_DNS_NO_PERIOD.name());\n+    }\n+  }\n+\n+  @Test\n+  public void testCreateZoneWithOptionsBatch() {\n+    try {\n+      DnsBatch batch = DNS.batch();\n+      DnsBatchResult<Zone> batchResult =\n+          batch.createZone(ZONE1, Dns.ZoneOption.fields(Dns.ZoneField.CREATION_TIME));\n+      batch.submit();\n+      Zone created = batchResult.get();\n+      assertEquals(ZONE1.name(), created.name()); // always returned\n+      assertNotNull(created.creationTimeMillis());\n+      assertNull(created.description());\n+      assertNull(created.dnsName());\n+      assertTrue(created.nameServers().isEmpty()); // never returns null\n+      assertNull(created.nameServerSet());\n+      assertNull(created.generatedId());\n+      created.delete();\n+      batch = DNS.batch();\n+      batchResult = batch.createZone(ZONE1, Dns.ZoneOption.fields(Dns.ZoneField.DESCRIPTION));\n+      batch.submit();\n+      created = batchResult.get();\n+      assertEquals(ZONE1.name(), created.name()); // always returned\n+      assertNull(created.creationTimeMillis());\n+      assertEquals(ZONE1.description(), created.description());\n+      assertNull(created.dnsName());\n+      assertTrue(created.nameServers().isEmpty()); // never returns null\n+      assertNull(created.nameServerSet());\n+      assertNull(created.generatedId());\n+      created.delete();\n+      batch = DNS.batch();\n+      batchResult = batch.createZone(ZONE1, Dns.ZoneOption.fields(Dns.ZoneField.DNS_NAME));\n+      batch.submit();\n+      created = batchResult.get();\n+      assertEquals(ZONE1.name(), created.name()); // always returned\n+      assertNull(created.creationTimeMillis());\n+      assertEquals(ZONE1.dnsName(), created.dnsName());\n+      assertNull(created.description());\n+      assertTrue(created.nameServers().isEmpty()); // never returns null\n+      assertNull(created.nameServerSet());\n+      assertNull(created.generatedId());\n+      created.delete();\n+      batch = DNS.batch();\n+      batchResult = batch.createZone(ZONE1, Dns.ZoneOption.fields(Dns.ZoneField.NAME));\n+      batch.submit();\n+      created = batchResult.get();\n+      assertEquals(ZONE1.name(), created.name()); // always returned\n+      assertNull(created.creationTimeMillis());\n+      assertNull(created.dnsName());\n+      assertNull(created.description());\n+      assertTrue(created.nameServers().isEmpty()); // never returns null\n+      assertNull(created.nameServerSet());\n+      assertNull(created.generatedId());\n+      created.delete();\n+      batch = DNS.batch();\n+      batchResult = batch.createZone(ZONE1, Dns.ZoneOption.fields(Dns.ZoneField.NAME_SERVER_SET));\n+      batch.submit();\n+      created = batchResult.get();\n+      assertEquals(ZONE1.name(), created.name()); // always returned\n+      assertNull(created.creationTimeMillis());\n+      assertNull(created.dnsName());\n+      assertNull(created.description());\n+      assertTrue(created.nameServers().isEmpty()); // never returns null\n+      assertNull(created.nameServerSet()); // we did not set it\n+      assertNull(created.generatedId());\n+      created.delete();\n+      batch = DNS.batch();\n+      batchResult = batch.createZone(ZONE1, Dns.ZoneOption.fields(Dns.ZoneField.NAME_SERVERS));\n+      batch.submit();\n+      created = batchResult.get();\n+      assertEquals(ZONE1.name(), created.name()); // always returned\n+      assertNull(created.creationTimeMillis());\n+      assertNull(created.dnsName());\n+      assertNull(created.description());\n+      assertFalse(created.nameServers().isEmpty());\n+      assertNull(created.nameServerSet());\n+      assertNull(created.generatedId());\n+      created.delete();\n+      batch = DNS.batch();\n+      batchResult = batch.createZone(ZONE1, Dns.ZoneOption.fields(Dns.ZoneField.ZONE_ID));\n+      batch.submit();\n+      created = batchResult.get();\n+      assertEquals(ZONE1.name(), created.name()); // always returned\n+      assertNull(created.creationTimeMillis());\n+      assertNull(created.dnsName());\n+      assertNull(created.description());\n+      assertNotNull(created.nameServers());\n+      assertTrue(created.nameServers().isEmpty()); // never returns null\n+      assertNotNull(created.generatedId());\n+      created.delete();\n+      batch = DNS.batch();\n+      batchResult = batch.createZone(ZONE1, Dns.ZoneOption.fields(Dns.ZoneField.ZONE_ID,\n+          Dns.ZoneField.NAME_SERVERS, Dns.ZoneField.NAME_SERVER_SET, Dns.ZoneField.DESCRIPTION));\n+      batch.submit();\n+      // combination of multiple things\n+      created = batchResult.get();\n+      assertEquals(ZONE1.name(), created.name()); // always returned\n+      assertNull(created.creationTimeMillis());\n+      assertNull(created.dnsName());\n+      assertEquals(ZONE1.description(), created.description());\n+      assertFalse(created.nameServers().isEmpty());\n+      assertNull(created.nameServerSet()); // we did not set it\n+      assertNotNull(created.generatedId());\n+    } finally {\n+      DNS.delete(ZONE1.name());\n+    }\n+  }\n+\n+  @Test\n+  public void testGetZoneBatch() {\n+    try {\n+      DNS.create(ZONE1, Dns.ZoneOption.fields(Dns.ZoneField.NAME));\n+      DnsBatch batch = DNS.batch();\n+      DnsBatchResult<Zone> timeResult =\n+          batch.getZone(ZONE1.name(), Dns.ZoneOption.fields(Dns.ZoneField.CREATION_TIME));\n+      DnsBatchResult<Zone> descriptionResult =\n+          batch.getZone(ZONE1.name(), Dns.ZoneOption.fields(Dns.ZoneField.DESCRIPTION));\n+      DnsBatchResult<Zone> dnsNameResult =\n+          batch.getZone(ZONE1.name(), Dns.ZoneOption.fields(Dns.ZoneField.DNS_NAME));\n+      DnsBatchResult<Zone> nameResult =\n+          batch.getZone(ZONE1.name(), Dns.ZoneOption.fields(Dns.ZoneField.NAME));\n+      DnsBatchResult<Zone> nameServerSetResult =\n+          batch.getZone(ZONE1.name(), Dns.ZoneOption.fields(Dns.ZoneField.NAME_SERVER_SET));\n+      DnsBatchResult<Zone> nameServersResult =\n+          batch.getZone(ZONE1.name(), Dns.ZoneOption.fields(Dns.ZoneField.NAME_SERVERS));\n+      DnsBatchResult<Zone> idResult =\n+          batch.getZone(ZONE1.name(), Dns.ZoneOption.fields(Dns.ZoneField.ZONE_ID));\n+      DnsBatchResult<Zone> combinationResult = batch.getZone(ZONE1.name(),\n+          Dns.ZoneOption.fields(Dns.ZoneField.ZONE_ID, Dns.ZoneField.NAME_SERVERS,\n+              Dns.ZoneField.NAME_SERVER_SET, Dns.ZoneField.DESCRIPTION));\n+      batch.submit();\n+      Zone created = timeResult.get();\n+      assertEquals(ZONE1.name(), created.name()); // always returned\n+      assertNotNull(created.creationTimeMillis());\n+      assertNull(created.description());\n+      assertNull(created.dnsName());\n+      assertTrue(created.nameServers().isEmpty()); // never returns null\n+      assertNull(created.nameServerSet());\n+      assertNull(created.generatedId());\n+      created = descriptionResult.get();\n+      assertEquals(ZONE1.name(), created.name()); // always returned\n+      assertNull(created.creationTimeMillis());\n+      assertEquals(ZONE1.description(), created.description());\n+      assertNull(created.dnsName());\n+      assertTrue(created.nameServers().isEmpty()); // never returns null\n+      assertNull(created.nameServerSet());\n+      assertNull(created.generatedId());\n+      created = dnsNameResult.get();\n+      assertEquals(ZONE1.name(), created.name()); // always returned\n+      assertNull(created.creationTimeMillis());\n+      assertEquals(ZONE1.dnsName(), created.dnsName());\n+      assertNull(created.description());\n+      assertTrue(created.nameServers().isEmpty()); // never returns null\n+      assertNull(created.nameServerSet());\n+      assertNull(created.generatedId());\n+      created = nameResult.get();\n+      assertEquals(ZONE1.name(), created.name()); // always returned\n+      assertNull(created.creationTimeMillis());\n+      assertNull(created.dnsName());\n+      assertNull(created.description());\n+      assertTrue(created.nameServers().isEmpty()); // never returns null\n+      assertNull(created.nameServerSet());\n+      assertNull(created.generatedId());\n+      created = nameServerSetResult.get();\n+      assertEquals(ZONE1.name(), created.name()); // always returned\n+      assertNull(created.creationTimeMillis());\n+      assertNull(created.dnsName());\n+      assertNull(created.description());\n+      assertTrue(created.nameServers().isEmpty()); // never returns null\n+      assertNull(created.nameServerSet()); // we did not set it\n+      assertNull(created.generatedId());\n+      created = nameServersResult.get();\n+      assertEquals(ZONE1.name(), created.name()); // always returned\n+      assertNull(created.creationTimeMillis());\n+      assertNull(created.dnsName());\n+      assertNull(created.description());\n+      assertFalse(created.nameServers().isEmpty());\n+      assertNull(created.nameServerSet());\n+      assertNull(created.generatedId());\n+      created = idResult.get();\n+      assertEquals(ZONE1.name(), created.name()); // always returned\n+      assertNull(created.creationTimeMillis());\n+      assertNull(created.dnsName());\n+      assertNull(created.description());\n+      assertNotNull(created.nameServers());\n+      assertTrue(created.nameServers().isEmpty()); // never returns null\n+      assertNotNull(created.generatedId());\n+      // combination of multiple things\n+      created = combinationResult.get();\n+      assertEquals(ZONE1.name(), created.name()); // always returned\n+      assertNull(created.creationTimeMillis());\n+      assertNull(created.dnsName());\n+      assertEquals(ZONE1.description(), created.description());\n+      assertFalse(created.nameServers().isEmpty());\n+      assertNull(created.nameServerSet()); // we did not set it\n+      assertNotNull(created.generatedId());\n+    } finally {\n+      DNS.delete(ZONE1.name());\n+    }\n+  }\n+\n+  @Test\n+  public void testDeleteZoneBatch() {\n+    try {\n+      Zone created = DNS.create(ZONE1);\n+      assertEquals(created, DNS.getZone(ZONE1.name()));\n+      DnsBatch batch = DNS.batch();\n+      DnsBatchResult<Boolean> result = batch.deleteZone(ZONE1.name());\n+      batch.submit();\n+      assertNull(DNS.getZone(ZONE1.name()));\n+      assertTrue(result.get());\n+    } finally {\n+      DNS.delete(ZONE1.name());\n+    }\n+  }\n+\n+  @Test\n+  public void testGetProjectBatch() {\n+    // fetches all fields\n+    DnsBatch batch = DNS.batch();\n+    DnsBatchResult<ProjectInfo> result = batch.getProject();\n+    DnsBatchResult<ProjectInfo> resultQuota =\n+        batch.getProject(Dns.ProjectOption.fields(Dns.ProjectField.QUOTA));\n+    DnsBatchResult<ProjectInfo> resultId =\n+        batch.getProject(Dns.ProjectOption.fields(Dns.ProjectField.PROJECT_ID));\n+    DnsBatchResult<ProjectInfo> resultNumber =\n+        batch.getProject(Dns.ProjectOption.fields(Dns.ProjectField.PROJECT_NUMBER));\n+    DnsBatchResult<ProjectInfo> resultCombination =\n+        batch.getProject(Dns.ProjectOption.fields(Dns.ProjectField.PROJECT_NUMBER,\n+            Dns.ProjectField.QUOTA, Dns.ProjectField.PROJECT_ID));\n+    batch.submit();\n+    assertNotNull(result.get().quota());\n+    assertNotNull(resultQuota.get().quota());\n+    assertNull(resultId.get().quota());\n+    assertNull(resultNumber.get().quota());\n+    assertNotNull(resultCombination.get().quota());\n+  }\n+\n+  @Test\n+  public void testCreateChangeBatch() {\n+    try {\n+      DNS.create(ZONE1, Dns.ZoneOption.fields(Dns.ZoneField.NAME));\n+      DnsBatch batch = DNS.batch();\n+      DnsBatchResult<ChangeRequest> result =\n+          batch.applyChangeRequest(ZONE1.name(), CHANGE_ADD_ZONE1);\n+      batch.submit();\n+      ChangeRequest created = result.get();\n+      assertEquals(CHANGE_ADD_ZONE1.additions(), created.additions());\n+      assertNotNull(created.startTimeMillis());\n+      assertTrue(created.deletions().isEmpty());\n+      assertEquals(\"1\", created.generatedId());\n+      assertTrue(ImmutableList.of(ChangeRequest.Status.PENDING, ChangeRequest.Status.DONE)\n+          .contains(created.status()));\n+      assertEqChangesIgnoreStatus(created, DNS.getChangeRequest(ZONE1.name(), \"1\"));\n+      waitForChangeToComplete(created);","path":"gcloud-java-dns/src/test/java/com/google/cloud/dns/it/ITDnsTest.java","position":490,"original_position":490,"commit_id":"74c9bc154351d798c5a0fec9216a93b539969a32","original_commit_id":"74c9bc154351d798c5a0fec9216a93b539969a32","user":{"login":"mderka","id":1192586,"avatar_url":"https://avatars.githubusercontent.com/u/1192586?v=3","gravatar_id":"","url":"https://api.github.com/users/mderka","html_url":"https://github.com/mderka","followers_url":"https://api.github.com/users/mderka/followers","following_url":"https://api.github.com/users/mderka/following{/other_user}","gists_url":"https://api.github.com/users/mderka/gists{/gist_id}","starred_url":"https://api.github.com/users/mderka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mderka/subscriptions","organizations_url":"https://api.github.com/users/mderka/orgs","repos_url":"https://api.github.com/users/mderka/repos","events_url":"https://api.github.com/users/mderka/events{/privacy}","received_events_url":"https://api.github.com/users/mderka/received_events","type":"User","site_admin":false},"body":"Change requests complete almost instantaneously. The delay is given by network communication. \r\n\r\nI would not do this. The zones need to be unqiue. Generating more unique zones would require more code to maintain, and it would have more overhead when deleting. Given how scarcely these tests run, I do not see trading additional code for potential (I seriously doubt it) performance increase as the way to go.","created_at":"2016-04-14T01:16:12Z","updated_at":"2016-04-14T01:16:12Z","html_url":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/919#discussion_r59652223","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/919","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/comments/59652223"},"html":{"href":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/919#discussion_r59652223"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/919"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/919","id":66390803,"html_url":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/919","diff_url":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/919.diff","patch_url":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/919.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/919","number":919,"state":"open","locked":false,"title":"Integration test for batch. Fixes #874.","user":{"login":"mderka","id":1192586,"avatar_url":"https://avatars.githubusercontent.com/u/1192586?v=3","gravatar_id":"","url":"https://api.github.com/users/mderka","html_url":"https://github.com/mderka","followers_url":"https://api.github.com/users/mderka/followers","following_url":"https://api.github.com/users/mderka/following{/other_user}","gists_url":"https://api.github.com/users/mderka/gists{/gist_id}","starred_url":"https://api.github.com/users/mderka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mderka/subscriptions","organizations_url":"https://api.github.com/users/mderka/orgs","repos_url":"https://api.github.com/users/mderka/repos","events_url":"https://api.github.com/users/mderka/events{/privacy}","received_events_url":"https://api.github.com/users/mderka/received_events","type":"User","site_admin":false},"body":"The test performs the same operations as the integration test without batch. Where possible, it groups calls into a single batch call. It adds one test checking that a combination of operations is possible as well.","created_at":"2016-04-13T21:00:54Z","updated_at":"2016-04-14T01:16:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ced7868e998c07ea9292937c09457610a16c5e9a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/919/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/919/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/919/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/statuses/74c9bc154351d798c5a0fec9216a93b539969a32","head":{"label":"mderka:ittestbatch","ref":"ittestbatch","sha":"74c9bc154351d798c5a0fec9216a93b539969a32","user":{"login":"mderka","id":1192586,"avatar_url":"https://avatars.githubusercontent.com/u/1192586?v=3","gravatar_id":"","url":"https://api.github.com/users/mderka","html_url":"https://github.com/mderka","followers_url":"https://api.github.com/users/mderka/followers","following_url":"https://api.github.com/users/mderka/following{/other_user}","gists_url":"https://api.github.com/users/mderka/gists{/gist_id}","starred_url":"https://api.github.com/users/mderka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mderka/subscriptions","organizations_url":"https://api.github.com/users/mderka/orgs","repos_url":"https://api.github.com/users/mderka/repos","events_url":"https://api.github.com/users/mderka/events{/privacy}","received_events_url":"https://api.github.com/users/mderka/received_events","type":"User","site_admin":false},"repo":{"id":49172330,"name":"gcloud-java","full_name":"mderka/gcloud-java","owner":{"login":"mderka","id":1192586,"avatar_url":"https://avatars.githubusercontent.com/u/1192586?v=3","gravatar_id":"","url":"https://api.github.com/users/mderka","html_url":"https://github.com/mderka","followers_url":"https://api.github.com/users/mderka/followers","following_url":"https://api.github.com/users/mderka/following{/other_user}","gists_url":"https://api.github.com/users/mderka/gists{/gist_id}","starred_url":"https://api.github.com/users/mderka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mderka/subscriptions","organizations_url":"https://api.github.com/users/mderka/orgs","repos_url":"https://api.github.com/users/mderka/repos","events_url":"https://api.github.com/users/mderka/events{/privacy}","received_events_url":"https://api.github.com/users/mderka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mderka/gcloud-java","description":"Google Cloud Client Library for Java","fork":true,"url":"https://api.github.com/repos/mderka/gcloud-java","forks_url":"https://api.github.com/repos/mderka/gcloud-java/forks","keys_url":"https://api.github.com/repos/mderka/gcloud-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mderka/gcloud-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mderka/gcloud-java/teams","hooks_url":"https://api.github.com/repos/mderka/gcloud-java/hooks","issue_events_url":"https://api.github.com/repos/mderka/gcloud-java/issues/events{/number}","events_url":"https://api.github.com/repos/mderka/gcloud-java/events","assignees_url":"https://api.github.com/repos/mderka/gcloud-java/assignees{/user}","branches_url":"https://api.github.com/repos/mderka/gcloud-java/branches{/branch}","tags_url":"https://api.github.com/repos/mderka/gcloud-java/tags","blobs_url":"https://api.github.com/repos/mderka/gcloud-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mderka/gcloud-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mderka/gcloud-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/mderka/gcloud-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mderka/gcloud-java/statuses/{sha}","languages_url":"https://api.github.com/repos/mderka/gcloud-java/languages","stargazers_url":"https://api.github.com/repos/mderka/gcloud-java/stargazers","contributors_url":"https://api.github.com/repos/mderka/gcloud-java/contributors","subscribers_url":"https://api.github.com/repos/mderka/gcloud-java/subscribers","subscription_url":"https://api.github.com/repos/mderka/gcloud-java/subscription","commits_url":"https://api.github.com/repos/mderka/gcloud-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/mderka/gcloud-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/mderka/gcloud-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/mderka/gcloud-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/mderka/gcloud-java/contents/{+path}","compare_url":"https://api.github.com/repos/mderka/gcloud-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mderka/gcloud-java/merges","archive_url":"https://api.github.com/repos/mderka/gcloud-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mderka/gcloud-java/downloads","issues_url":"https://api.github.com/repos/mderka/gcloud-java/issues{/number}","pulls_url":"https://api.github.com/repos/mderka/gcloud-java/pulls{/number}","milestones_url":"https://api.github.com/repos/mderka/gcloud-java/milestones{/number}","notifications_url":"https://api.github.com/repos/mderka/gcloud-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mderka/gcloud-java/labels{/name}","releases_url":"https://api.github.com/repos/mderka/gcloud-java/releases{/id}","deployments_url":"https://api.github.com/repos/mderka/gcloud-java/deployments","created_at":"2016-01-07T01:16:58Z","updated_at":"2016-01-11T19:05:33Z","pushed_at":"2016-04-13T20:58:54Z","git_url":"git://github.com/mderka/gcloud-java.git","ssh_url":"git@github.com:mderka/gcloud-java.git","clone_url":"https://github.com/mderka/gcloud-java.git","svn_url":"https://github.com/mderka/gcloud-java","homepage":"http://googlecloudplatform.github.io/gcloud-java/","size":15160,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:dns-alpha-batch","ref":"dns-alpha-batch","sha":"beea588369267e59f7d2c3f10cf20088195f9d66","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":26181278,"name":"gcloud-java","full_name":"GoogleCloudPlatform/gcloud-java","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/gcloud-java","description":"Google Cloud Client Library for Java","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/deployments","created_at":"2014-11-04T17:57:16Z","updated_at":"2016-04-13T22:32:59Z","pushed_at":"2016-04-13T21:55:19Z","git_url":"git://github.com/GoogleCloudPlatform/gcloud-java.git","ssh_url":"git@github.com:GoogleCloudPlatform/gcloud-java.git","clone_url":"https://github.com/GoogleCloudPlatform/gcloud-java.git","svn_url":"https://github.com/GoogleCloudPlatform/gcloud-java","homepage":"http://googlecloudplatform.github.io/gcloud-java/","size":224041,"stargazers_count":88,"watchers_count":88,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":46,"mirror_url":null,"open_issues_count":155,"forks":46,"open_issues":155,"watchers":88,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/919"},"html":{"href":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/919"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/919"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/919/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/919/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/919/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/statuses/74c9bc154351d798c5a0fec9216a93b539969a32"}}}}