Skip to content

Commit

Permalink
test fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
arun-shopify committed Sep 6, 2022
1 parent 4b15ca6 commit 826fa33
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions exporter/prometheusexporter/collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,12 @@ func TestConvertDoubleHistogramExemplar(t *testing.T) {
require.Equal(t, 3.0, buckets[0].GetExemplar().GetValue())
require.Equal(t, int32(128654848), buckets[0].GetExemplar().GetTimestamp().GetNanos())
require.Equal(t, 2, len(buckets[0].GetExemplar().GetLabel()))
require.Equal(t, "trace_id", buckets[0].GetExemplar().GetLabel()[0].GetName())
require.Equal(t, "641d68e314a58152cc2581e7663435d1", buckets[0].GetExemplar().GetLabel()[0].GetValue())
require.Equal(t, "span_id", buckets[0].GetExemplar().GetLabel()[1].GetName())
require.Equal(t, "7436d6ac76178623", buckets[0].GetExemplar().GetLabel()[1].GetValue())
ml := make(map[string]string)
for _, l := range buckets[0].GetExemplar().GetLabel() {
ml[l.GetName()] = l.GetValue()
}
require.Equal(t, "641d68e314a58152cc2581e7663435d1", ml["trace_id"])
require.Equal(t, "7436d6ac76178623", ml["span_id"])
}

// errorCheckCore keeps track of logged errors
Expand Down

0 comments on commit 826fa33

Please sign in to comment.