Skip to content

Commit

Permalink
Make timestamps sequential in lastvalue agg check (#1579)
Browse files Browse the repository at this point in the history
* Make timestamps sequential in lastvalue agg check

* Set PR number in changelog

* Fix location of sleep

The lastvalue timestamp is set on update. Correct the location of the
sleep to bridge the update of the two different aggregators.
  • Loading branch information
MrAlias authored Feb 25, 2021
1 parent 37688ef commit 43886e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

- The sequential timing check of timestamps in the stdout exporter are now setup explicitly to be sequential (#1571). (#1572)
- Windows build of Jaeger tests now compiles with OS specific functions (#1576). (#1577)
- The sequential timing check of timestamps of go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue are now setup explicitly to be sequential (#1578). (#1579)

## [0.17.0] - 2020-02-12

Expand Down
2 changes: 2 additions & 0 deletions sdk/metric/aggregator/lastvalue/lastvalue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ func TestLastValueMerge(t *testing.T) {
first1.AddNumber(profile.NumberKind, first2)

aggregatortest.CheckedUpdate(t, agg1, first1, descriptor)
// Ensure these should not have the same timestamp.
time.Sleep(time.Nanosecond)
aggregatortest.CheckedUpdate(t, agg2, first2, descriptor)

require.NoError(t, agg1.SynchronizedMove(ckpt1, descriptor))
Expand Down

0 comments on commit 43886e5

Please sign in to comment.