Skip to content

Commit

Permalink
Replaced change IDs equals tests with not null.
Browse files Browse the repository at this point in the history
  • Loading branch information
mderka committed Apr 15, 2016
1 parent 66c257d commit 6e9ed8c
Showing 1 changed file with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ public void testCreateChange() {
assertEquals(CHANGE_ADD_ZONE1.additions(), created.additions());
assertNotNull(created.startTimeMillis());
assertTrue(created.deletions().isEmpty());
assertEquals("1", created.generatedId());
assertNotNull(created.generatedId());
assertTrue(ImmutableList.of(ChangeRequest.Status.PENDING, ChangeRequest.Status.DONE)
.contains(created.status()));
assertEqChangesIgnoreStatus(created, DNS.getChangeRequest(ZONE1.name(), "1"));
Expand All @@ -545,7 +545,7 @@ public void testCreateChange() {
assertTrue(created.additions().isEmpty());
assertNull(created.startTimeMillis());
assertTrue(created.deletions().isEmpty());
assertEquals("3", created.generatedId());
assertNotNull(created.generatedId());
assertNull(created.status());
waitForChangeToComplete(created);
created = DNS.applyChangeRequest(ZONE1.name(), CHANGE_DELETE_ZONE1);
Expand All @@ -555,7 +555,7 @@ public void testCreateChange() {
assertTrue(created.additions().isEmpty());
assertNull(created.startTimeMillis());
assertTrue(created.deletions().isEmpty());
assertEquals("5", created.generatedId());
assertNotNull(created.generatedId());
assertNotNull(created.status());
waitForChangeToComplete(created);
created = DNS.applyChangeRequest(ZONE1.name(), CHANGE_DELETE_ZONE1);
Expand All @@ -565,7 +565,7 @@ public void testCreateChange() {
assertTrue(created.additions().isEmpty());
assertNotNull(created.startTimeMillis());
assertTrue(created.deletions().isEmpty());
assertEquals("7", created.generatedId());
assertNotNull(created.generatedId());
assertNull(created.status());
waitForChangeToComplete(created);
created = DNS.applyChangeRequest(ZONE1.name(), CHANGE_DELETE_ZONE1);
Expand All @@ -575,7 +575,7 @@ public void testCreateChange() {
assertEquals(CHANGE_ADD_ZONE1.additions(), created.additions());
assertNull(created.startTimeMillis());
assertTrue(created.deletions().isEmpty());
assertEquals("9", created.generatedId());
assertNotNull(created.generatedId());
assertNull(created.status());
// finishes with delete otherwise we cannot delete the zone
waitForChangeToComplete(created);
Expand All @@ -585,7 +585,7 @@ public void testCreateChange() {
assertEquals(CHANGE_DELETE_ZONE1.deletions(), created.deletions());
assertNull(created.startTimeMillis());
assertTrue(created.additions().isEmpty());
assertEquals("10", created.generatedId());
assertNotNull(created.generatedId());
assertNull(created.status());
waitForChangeToComplete(created);
} finally {
Expand Down Expand Up @@ -731,7 +731,7 @@ public void testListChanges() {
change = changes.get(1);
assertEquals(CHANGE_ADD_ZONE1.additions(), change.additions());
assertTrue(change.deletions().isEmpty());
assertEquals("1", change.generatedId());
assertNotNull(change.generatedId());
assertNull(change.startTimeMillis());
assertNull(change.status());
changes = ImmutableList.copyOf(DNS.listChangeRequests(ZONE1.name(),
Expand All @@ -740,7 +740,7 @@ public void testListChanges() {
change = changes.get(2);
assertTrue(change.additions().isEmpty());
assertNotNull(change.deletions());
assertEquals("2", change.generatedId());
assertNotNull(change.generatedId());
assertNull(change.startTimeMillis());
assertNull(change.status());
changes = ImmutableList.copyOf(DNS.listChangeRequests(ZONE1.name(),
Expand All @@ -749,7 +749,7 @@ public void testListChanges() {
change = changes.get(1);
assertTrue(change.additions().isEmpty());
assertTrue(change.deletions().isEmpty());
assertEquals("1", change.generatedId());
assertNotNull(change.generatedId());
assertNull(change.startTimeMillis());
assertNull(change.status());
changes = ImmutableList.copyOf(DNS.listChangeRequests(ZONE1.name(),
Expand All @@ -758,7 +758,7 @@ public void testListChanges() {
change = changes.get(1);
assertTrue(change.additions().isEmpty());
assertTrue(change.deletions().isEmpty());
assertEquals("1", change.generatedId());
assertNotNull(change.generatedId());
assertNotNull(change.startTimeMillis());
assertNull(change.status());
changes = ImmutableList.copyOf(DNS.listChangeRequests(ZONE1.name(),
Expand All @@ -767,7 +767,7 @@ public void testListChanges() {
change = changes.get(1);
assertTrue(change.additions().isEmpty());
assertTrue(change.deletions().isEmpty());
assertEquals("1", change.generatedId());
assertNotNull(change.generatedId());
assertNull(change.startTimeMillis());
assertEquals(ChangeRequest.Status.DONE, change.status());
} finally {
Expand Down Expand Up @@ -1439,7 +1439,7 @@ public void testCreateChangeBatch() {
assertEquals(CHANGE_ADD_ZONE1.additions(), created.additions());
assertNotNull(created.startTimeMillis());
assertTrue(created.deletions().isEmpty());
assertEquals("1", created.generatedId());
assertNotNull(created.generatedId());
assertTrue(ImmutableList.of(ChangeRequest.Status.PENDING, ChangeRequest.Status.DONE)
.contains(created.status()));
assertEqChangesIgnoreStatus(created, DNS.getChangeRequest(ZONE1.name(), "1"));
Expand All @@ -1455,7 +1455,7 @@ public void testCreateChangeBatch() {
assertTrue(created.additions().isEmpty());
assertNull(created.startTimeMillis());
assertTrue(created.deletions().isEmpty());
assertEquals("3", created.generatedId());
assertNotNull(created.generatedId());
assertNull(created.status());
waitForChangeToComplete(created);
created = DNS.applyChangeRequest(ZONE1.name(), CHANGE_DELETE_ZONE1);
Expand All @@ -1468,7 +1468,7 @@ public void testCreateChangeBatch() {
assertTrue(created.additions().isEmpty());
assertNull(created.startTimeMillis());
assertTrue(created.deletions().isEmpty());
assertEquals("5", created.generatedId());
assertNotNull(created.generatedId());
assertNotNull(created.status());
waitForChangeToComplete(created);
created = DNS.applyChangeRequest(ZONE1.name(), CHANGE_DELETE_ZONE1);
Expand All @@ -1481,7 +1481,7 @@ public void testCreateChangeBatch() {
assertTrue(created.additions().isEmpty());
assertNotNull(created.startTimeMillis());
assertTrue(created.deletions().isEmpty());
assertEquals("7", created.generatedId());
assertNotNull(created.generatedId());
assertNull(created.status());
waitForChangeToComplete(created);
created = DNS.applyChangeRequest(ZONE1.name(), CHANGE_DELETE_ZONE1);
Expand All @@ -1494,7 +1494,7 @@ public void testCreateChangeBatch() {
assertEquals(CHANGE_ADD_ZONE1.additions(), created.additions());
assertNull(created.startTimeMillis());
assertTrue(created.deletions().isEmpty());
assertEquals("9", created.generatedId());
assertNotNull(created.generatedId());
assertNull(created.status());
// finishes with delete otherwise we cannot delete the zone
waitForChangeToComplete(created);
Expand All @@ -1507,7 +1507,7 @@ public void testCreateChangeBatch() {
assertEquals(CHANGE_DELETE_ZONE1.deletions(), created.deletions());
assertNull(created.startTimeMillis());
assertTrue(created.additions().isEmpty());
assertEquals("10", created.generatedId());
assertNotNull(created.generatedId());
assertNull(created.status());
waitForChangeToComplete(created);
} finally {
Expand Down Expand Up @@ -1671,31 +1671,31 @@ public void testListChangesBatch() {
change = Iterables.get(resultAdditions.get().values(), 1);
assertEquals(CHANGE_ADD_ZONE1.additions(), change.additions());
assertTrue(change.deletions().isEmpty());
assertEquals("1", change.generatedId());
assertNotNull(change.generatedId());
assertNull(change.startTimeMillis());
assertNull(change.status());
change = Iterables.get(resultDeletions.get().values(), 2);
assertTrue(change.additions().isEmpty());
assertNotNull(change.deletions());
assertEquals("2", change.generatedId());
assertNotNull(change.generatedId());
assertNull(change.startTimeMillis());
assertNull(change.status());
change = Iterables.get(resultId.get().values(), 1);
assertTrue(change.additions().isEmpty());
assertTrue(change.deletions().isEmpty());
assertEquals("1", change.generatedId());
assertNotNull(change.generatedId());
assertNull(change.startTimeMillis());
assertNull(change.status());
change = Iterables.get(resultTime.get().values(), 1);
assertTrue(change.additions().isEmpty());
assertTrue(change.deletions().isEmpty());
assertEquals("1", change.generatedId());
assertNotNull(change.generatedId());
assertNotNull(change.startTimeMillis());
assertNull(change.status());
change = Iterables.get(resultStatus.get().values(), 1);
assertTrue(change.additions().isEmpty());
assertTrue(change.deletions().isEmpty());
assertEquals("1", change.generatedId());
assertNotNull(change.generatedId());
assertNull(change.startTimeMillis());
assertEquals(ChangeRequest.Status.DONE, change.status());
} finally {
Expand Down

0 comments on commit 6e9ed8c

Please sign in to comment.