You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kratos/pkg/net/trace/marshal_test.go

19 lines
425 B

6 years ago
package trace
import (
"testing"
)
func TestMarshalSpanV1(t *testing.T) {
report := &mockReport{}
t1 := newTracer("service1", report, &Config{DisableSample: true})
sp1 := t1.New("opt_test").(*span)
sp1.SetLog(Log("hello", "test123"))
sp1.SetTag(TagString("tag1", "hell"), TagBool("booltag", true), TagFloat64("float64tag", 3.14159))
sp1.Finish(nil)
_, err := marshalSpanV1(sp1)
if err != nil {
t.Error(err)
}
}