Skip to content

Commit

Permalink
Fix failing urllib test case
Browse files Browse the repository at this point in the history
This test case started failing after a fix for the handling of empty
metric collection cycles was added to the core repo.

Fixes #2032
  • Loading branch information
ocelotl committed Nov 2, 2023
1 parent 657d502 commit 90d79ae
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'release/*'
pull_request:
env:
CORE_REPO_SHA: 0ef76a5cc39626f783416ca75e43556e2bb2739d
CORE_REPO_SHA: d054dff47d2da663a39b9656d106c3d15f344269

jobs:
build:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,18 @@ def test_metric_uninstrument(self):
metrics = self.get_sorted_metrics()
self.assertEqual(len(metrics), 3)

self.assertEqual(
metrics[0].data.data_points[0].sum, 1
)
self.assertEqual(
metrics[1].data.data_points[0].sum, 0
)
self.assertEqual(
metrics[2].data.data_points[0].sum, 6
)

URLLibInstrumentor().uninstrument()
with request.urlopen(self.URL):
metrics = self.get_sorted_metrics()
self.assertEqual(len(metrics), 3)

for metric in metrics:
for point in list(metric.data.data_points):
self.assertEqual(point.count, 1)
self.assertIsNone(
self.memory_metrics_reader.get_metrics_data()
)

0 comments on commit 90d79ae

Please sign in to comment.