Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix test logic
  • Loading branch information
cijothomas committed Nov 29, 2023
commit 505bb7d35e4cf9f73b22d491856364b02dc1dcbe
6 changes: 3 additions & 3 deletions test/OpenTelemetry.Tests/Metrics/MetricApiTestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public void MetricInstrumentationScopeIsExportedCorrectly()
Assert.Equal(meterName, metric.MeterName);
Assert.Equal(meterVersion, metric.MeterVersion);

Assert.Single(metric.MeterTags.Attributes.Where(kvp => kvp.Key == meterTags[0].Key && kvp.Value == meterTags[0].Value));
Assert.Single(metric.MeterTags.Where(kvp => kvp.Key == meterTags[0].Key && kvp.Value == meterTags[0].Value));
}

[Fact]
Expand Down Expand Up @@ -248,8 +248,8 @@ public void MetricInstrumentationScopeAttributesAreNotTreatedAsIdentifyingProper
Assert.Equal(meterName, metric.MeterName);
Assert.Equal(meterVersion, metric.MeterVersion);

Assert.Single(metric.MeterTags.Attributes.Where(kvp => kvp.Key == meterTags1[0].Key && kvp.Value == meterTags1[0].Value));
Assert.DoesNotContain(metric.MeterTags.Attributes.Where(kvp => kvp.Key == meterTags2[0].Key && kvp.Value == meterTags2[0].Value));
Assert.Single(metric.MeterTags.Where(kvp => kvp.Key == meterTags1[0].Key && kvp.Value == meterTags1[0].Value));
Assert.Empty(metric.MeterTags.Where(kvp => kvp.Key == meterTags2[0].Key && kvp.Value == meterTags2[0].Value));

List<MetricPoint> metricPoints = new List<MetricPoint>();
foreach (ref readonly var mp in metric.GetMetricPoints())
Expand Down