Skip to content

Commit c949bf4

Browse files
authored
Don't error on failure to delete aws account (#284)
1 parent 26472d5 commit c949bf4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/test/java/com/datadog/api/v1/client/api/AwsLogsIntegrationApiTest.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,13 @@ public void cleanupAWSAccount() throws TestUtils.RetryException {
8484
try {
8585
AWSApi.deleteAWSAccount().body(uniqueAWSAccount).execute();
8686
} catch (ApiException e) {
87-
System.out.println(String.format("Error deleting AWS Account: %s", e));
88-
return false;
87+
if(e.getCode() == 400) {
88+
System.out.println(String.format("Error deleting AWS Account: %s. The test was likely a unit test", e));
89+
return true;
90+
} else {
91+
System.out.println(String.format("Error deleting AWS Account: %s", e));
92+
return false;
93+
}
8994
}
9095
return true;
9196
});

0 commit comments

Comments
 (0)