mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-02-05 13:15:41 +02:00
Fix stdout TestStdoutTimestamp failure with sleep (#1572)
* Fix stdout TestStdoutTimestamp failure with sleep Ensure the test condition is valid by introducing minimal sleep durations before and after a timestamp is measured. Resolves #1571 * Add changes to changelog Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
This commit is contained in:
parent
bd4701eb93
commit
4a163beaa1
@ -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
|
||||
|
@ -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)
|
||||
|
||||
@ -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{}
|
||||
|
Loading…
x
Reference in New Issue
Block a user