influxdb/stress/v2/stress_client/tracer_test.go

18 lines
332 B
Go
Raw Normal View History

package stressClient
2016-04-21 18:03:43 +00:00
import (
"testing"
)
func TestNewTracer(t *testing.T) {
tagValue := "foo_tag_value"
tracer := NewTracer(map[string]string{"foo_tag_key": tagValue})
got := tracer.Tags["foo_tag_key"]
if got != tagValue {
t.Errorf("expected: %v\ngot: %v", tagValue, got)
}
tracer.Add(1)
tracer.Done()
tracer.Wait()
}