Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stdout TestStdoutTimestamp failure with sleep #1572

Merged
merged 3 commits into from
Feb 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

- Removed attempt to resample spans upon changing the span name with `span.SetName()`. (#1545)

### Fixed

- The sequential timing check of timestamps in the stdout exporter are now setup explicitly to be sequential (#1571). (#1572)

## [0.17.0] - 2020-02-12

### Changed
Expand Down
4 changes: 4 additions & 0 deletions exporters/stdout/metric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ func TestStdoutTimestamp(t *testing.T) {
}

before := time.Now()
// Ensure the timestamp is after before.
time.Sleep(time.Nanosecond)

checkpointSet := metrictest.NewCheckpointSet(testResource)

Expand All @@ -102,6 +104,8 @@ func TestStdoutTimestamp(t *testing.T) {
t.Fatal("Unexpected export error: ", err)
}

// Ensure the timestamp is before after.
time.Sleep(time.Nanosecond)
after := time.Now()

var printed []interface{}
Expand Down