Skip to content

Commit

Permalink
[metricsadvisor] refresh fewer data points in test (Azure#14734)
Browse files Browse the repository at this point in the history
* refresh fewer data points in test

* rerecord test with new incident id
  • Loading branch information
kristapratico authored Oct 23, 2020
1 parent ea56821 commit a10d9cb
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
body: '{"startTime": "2019-10-01T00:00:00.000Z", "endTime": "2020-10-03T00:00:00.000Z"}'
body: '{"startTime": "2020-10-01T00:00:00.000Z", "endTime": "2020-10-02T00:00:00.000Z"}'
headers:
Accept:
- application/json
Expand All @@ -16,13 +16,13 @@ interactions:
body:
string: ''
headers:
apim-request-id: 43223ea7-3f2c-46e5-bb09-3160b0f0a5c7
apim-request-id: 3710fc40-1383-494e-b3c3-2b825e51ba0c
content-length: '0'
date: Thu, 22 Oct 2020 15:53:03 GMT
date: Fri, 23 Oct 2020 15:51:34 GMT
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
x-envoy-upstream-service-time: '478'
x-request-id: 43223ea7-3f2c-46e5-bb09-3160b0f0a5c7
x-envoy-upstream-service-time: '269'
x-request-id: 3710fc40-1383-494e-b3c3-2b825e51ba0c
status:
code: 204
message: No Content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ interactions:
uri: https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/anomaly_detection_configuration_id/incidents/incident_id/rootCause
response:
body:
string: '{"value":[{"rootCause":{"dimension":{"dimension_name":"Delhi","category":"Shoes
Handbags & Sunglasses"}},"path":[],"score":1.0,"description":"No root cause
insight."}]}'
string: '{"value":[{"rootCause":{"dimension":{"category":"Shoes Handbags & Sunglasses","dimension_name":"Mumbai"}},"path":["dimension_name","category"],"score":0.1494267098214867,"description":"Decrease
on category = Shoes Handbags & Sunglasses | dimension_name = Mumbai contributes
the most to current incident."}]}'
headers:
apim-request-id: cfcdc20a-41b8-456c-ab1c-7b2b6b09f53f
content-length: '158'
apim-request-id: 10991b64-5d97-4897-b69c-7a83a1cd219b
content-length: '277'
content-type: application/json; charset=utf-8
date: Wed, 21 Oct 2020 21:37:15 GMT
date: Fri, 23 Oct 2020 16:06:06 GMT
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
x-envoy-upstream-service-time: '223'
x-request-id: cfcdc20a-41b8-456c-ab1c-7b2b6b09f53f
x-envoy-upstream-service-time: '5422'
x-request-id: 10991b64-5d97-4897-b69c-7a83a1cd219b
status:
code: 200
message: OK
url: https://js-metrics-advisor.cognitiveservices.azure.com//metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/fb5a6ed6-2b9e-4b72-8b0c-0046ead1c15c/incidents/51d849d03277901eadfa9a0e7665b4ad-175434e3400/rootCause
url: https://js-metrics-advisor.cognitiveservices.azure.com//metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/fb5a6ed6-2b9e-4b72-8b0c-0046ead1c15c/incidents/5a0692283edccf37ce825b3a8d475f4e-174e1756000/rootCause
version: 1
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ async def test_refresh_data_feed_ingestion(self):
async with self.admin_client:
await self.admin_client.refresh_data_feed_ingestion(
self.data_feed_id,
start_time=datetime.datetime(2019, 10, 1, tzinfo=tzutc()),
end_time=datetime.datetime(2020, 10, 3, tzinfo=tzutc()),
start_time=datetime.datetime(2020, 10, 1, tzinfo=tzutc()),
end_time=datetime.datetime(2020, 10, 2, tzinfo=tzutc()),
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
body: '{"startTime": "2019-10-01T00:00:00.000Z", "endTime": "2020-10-03T00:00:00.000Z"}'
body: '{"startTime": "2020-10-01T00:00:00.000Z", "endTime": "2020-10-02T00:00:00.000Z"}'
headers:
Accept:
- application/json
Expand All @@ -21,19 +21,19 @@ interactions:
string: ''
headers:
apim-request-id:
- 6e7db113-185e-4c19-a652-4c1e3e7444a6
- d6b6ef03-abbf-4310-bc8d-c5bf7b46d87b
content-length:
- '0'
date:
- Thu, 22 Oct 2020 15:49:42 GMT
- Fri, 23 Oct 2020 15:51:23 GMT
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
x-content-type-options:
- nosniff
x-envoy-upstream-service-time:
- '254'
- '303'
x-request-id:
- 6e7db113-185e-4c19-a652-4c1e3e7444a6
- d6b6ef03-abbf-4310-bc8d-c5bf7b46d87b
status:
code: 204
message: No Content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ interactions:
uri: https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/anomaly_detection_configuration_id/incidents/incident_id/rootCause
response:
body:
string: '{"value":[{"rootCause":{"dimension":{"dimension_name":"Delhi","category":"Shoes
Handbags & Sunglasses"}},"path":[],"score":1.0,"description":"No root cause
insight."}]}'
string: '{"value":[{"rootCause":{"dimension":{"category":"Shoes Handbags & Sunglasses","dimension_name":"Mumbai"}},"path":["dimension_name","category"],"score":0.1494267098214867,"description":"Decrease
on category = Shoes Handbags & Sunglasses | dimension_name = Mumbai contributes
the most to current incident."}]}'
headers:
apim-request-id:
- 8fa88e36-f866-48c1-825d-1861135b9584
- 828a8895-7d09-4a7f-9deb-3971845e666e
content-length:
- '158'
- '277'
content-type:
- application/json; charset=utf-8
date:
- Wed, 21 Oct 2020 21:42:39 GMT
- Fri, 23 Oct 2020 16:05:03 GMT
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
x-content-type-options:
- nosniff
x-envoy-upstream-service-time:
- '211'
- '352'
x-request-id:
- 8fa88e36-f866-48c1-825d-1861135b9584
- 828a8895-7d09-4a7f-9deb-3971845e666e
status:
code: 200
message: OK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_list_data_feed_ingestion_status_with_skip(self):
def test_refresh_data_feed_ingestion(self):
self.admin_client.refresh_data_feed_ingestion(
self.data_feed_id,
start_time=datetime.datetime(2019, 10, 1, tzinfo=tzutc()),
end_time=datetime.datetime(2020, 10, 3, tzinfo=tzutc()),
start_time=datetime.datetime(2020, 10, 1, tzinfo=tzutc()),
end_time=datetime.datetime(2020, 10, 2, tzinfo=tzutc()),
)

0 comments on commit a10d9cb

Please sign in to comment.