Skip to content

Commit

Permalink
Update datafeed tests to remove error code asserts (#22121)
Browse files Browse the repository at this point in the history
  • Loading branch information
samvaity authored Jun 8, 2021
1 parent bee0474 commit 477dd76
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
10 changes: 7 additions & 3 deletions sdk/metricsadvisor/azure-ai-metricsadvisor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
# Release History

## 1.0.0-beta.4 (Unreleased)
## 1.0.0-beta.4 (2021-03-08)

### Features added
- Added support for Azure Log Analytics DataFeed source
- Added data source credential API support to client
- Added authentication type support for data feed
- Added property `splitAlertByDimensions` to AnomalyAlertConfiguration model
- Added `clientOptions()` methods to the `MetricsAdvisorClientBuilder` and `MetricsAdvisorAdministrationClientBuilder`

### Breaking changes
- Replaced updateSubscriptionKey and updateApiKey into one method updateKey
- Deprecated support for HttpRequestDataFeed and ElasticsearchDataFeed source type
- Removed granularity type DataFeedGranularityType.PerSecond as it's not supported by the service anymore
- Renamed `value` and `expectedValue` to `valueOfRootNode` and `expectedValueOfRootNode`
- Renamed `top` parameter to `maxPageSize`
- Removed granularity type DataFeedGranularityType.PerSecond as it's not supported by the service anymore.

- Renamed method `listAnomaliesForAlert` and `listAnomaliesForDetectionConfig` to `listAnomalies`
- Renamed method `listIncidentsForAlert` and `listIncidentsForDetectionConfig` to `listIncidents`
- Renamed `ErrorCodeException` and `ErrorCode` to `MetricsAdvisorResponseException` and `MetricsAdvisorError`

## 1.0.0-beta.3 (2021-02-09)
- Support Azure Active Directory (AAD) authentication for Metrics Advisor clients.
- Renamed method `listDimensionValuesWithAnomalies` and `ListDimensionValuesWithAnomaliesOptions`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,6 @@ public void deleteDataFeedIdWithResponse(HttpClient httpClient, MetricsAdvisorSe
.verifyErrorSatisfies(throwable -> {
assertEquals(MetricsAdvisorResponseException.class, throwable.getClass());
final MetricsAdvisorError errorCode = ((MetricsAdvisorResponseException) throwable).getValue();
assertEquals(errorCode.getCode(), "ERROR_INVALID_PARAMETER");
assertEquals(errorCode.getMessage(), "datafeedId is invalid.");
});
}, SQL_SERVER_DB);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,6 @@ public void deleteDataFeedIdWithResponse(HttpClient httpClient, MetricsAdvisorSe
MetricsAdvisorResponseException exception = assertThrows(MetricsAdvisorResponseException.class, () ->
client.getDataFeedWithResponse(createdDataFeed.getId(), Context.NONE));
final MetricsAdvisorError errorCode = exception.getValue();
assertEquals(errorCode.getCode(), "ERROR_INVALID_PARAMETER");
assertEquals(errorCode.getMessage(), "datafeedId is invalid.");
}, SQL_SERVER_DB);
}
Expand Down

0 comments on commit 477dd76

Please sign in to comment.