Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration test to test scope is flushed correctly for shortly l…
…ived programs (#92) There were some reporting metrics that haven't been flushed on program shutdown, this is likely due to program lifecycle however since this test is unable to reproduce the problem: ``` $ go test -v -run TestIntegrationProcessFlushOnExit -count 100 === RUN TestIntegrationProcessFlushOnExit Test 0 emitted: [Metric({Name:my-gauge MetricValue:MetricValue({Count:<nil> Gauge:<nil> Timer:TimerValue({I64Value:0xc000098980 DValue:<nil>})}) Timestamp:0xc000098990 Tags:map[]}) Me tric({Name:my-counter MetricValue:MetricValue({Count:CountValue({I64Value:0xc0000989b8}) Gauge:<nil> Timer:<nil>}) Timestamp:0xc0000989c8 Tags:map[]}) Metric({Name:my- gauge MetricValue:MetricValue({Count:<nil> Gauge:GaugeValue({I64Value:<nil> DValue:0xc0000989f0}) Timer:<nil>}) Timestamp:0xc000098a00 Tags:map[]})] ... Test 4 emitted: [Metric({Name:my-gauge MetricValue:MetricValue({Count:<nil> Gauge:<nil> Timer:TimerValue({I64Value:0xc000099330 DValue:<nil>})}) Timestamp:0xc000099340 Tags:map[]}) Me tric({Name:my-counter MetricValue:MetricValue({Count:CountValue({I64Value:0xc000099368}) Gauge:<nil> Timer:<nil>}) Timestamp:0xc000099378 Tags:map[]}) Metric({Name:my- gauge MetricValue:MetricValue({Count:<nil> Gauge:GaugeValue({I64Value:<nil> DValue:0xc0000993a0}) Timer:<nil>}) Timestamp:0xc0000993b0 Tags:map[]})] --- PASS: TestIntegrationProcessFlushOnExit (4.33s) ... ``` Repeating the tests 100 iterations all pass.
- Loading branch information