Skip to content

Commit

Permalink
allow cleanup if record not added
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajay Kannan committed Mar 30, 2016
1 parent 4d7cb29 commit 80268f7
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -650,10 +650,11 @@ public void testInvalidChangeRequest() {
assertEquals(400, ex.code());
}
} finally {
assertTrue(recordAdded);
ChangeRequestInfo deletion = ChangeRequest.builder().delete(validA).build();
ChangeRequest request = zone.applyChangeRequest(deletion);
waitForChangeToComplete(zone.name(), request.id());
if (recordAdded) {
ChangeRequestInfo deletion = ChangeRequest.builder().delete(validA).build();
ChangeRequest request = zone.applyChangeRequest(deletion);
waitForChangeToComplete(zone.name(), request.id());
}
zone.delete();
}
}
Expand Down

0 comments on commit 80268f7

Please sign in to comment.