fix(trace): grpc exporter should use nonblock option (#2744)
* fix(trace): grpc exporter should use nonblock option * chore: sort imports
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
@@ -13,6 +14,7 @@ func TestStartAgent(t *testing.T) {
|
||||
const (
|
||||
endpoint1 = "localhost:1234"
|
||||
endpoint2 = "remotehost:1234"
|
||||
endpoint3 = "localhost:1235"
|
||||
)
|
||||
c1 := Config{
|
||||
Name: "foo",
|
||||
@@ -29,12 +31,12 @@ func TestStartAgent(t *testing.T) {
|
||||
}
|
||||
c4 := Config{
|
||||
Name: "bla",
|
||||
Endpoint: endpoint1,
|
||||
Endpoint: endpoint3,
|
||||
Batcher: "otlp",
|
||||
}
|
||||
c5 := Config{
|
||||
Name: "grpc",
|
||||
Endpoint: endpoint1,
|
||||
Endpoint: endpoint3,
|
||||
Batcher: "grpc",
|
||||
}
|
||||
|
||||
@@ -49,7 +51,7 @@ func TestStartAgent(t *testing.T) {
|
||||
defer lock.Unlock()
|
||||
|
||||
// because remotehost cannot be resolved
|
||||
assert.Equal(t, 2, len(agents))
|
||||
assert.Equal(t, 3, len(agents))
|
||||
_, ok := agents[""]
|
||||
assert.True(t, ok)
|
||||
_, ok = agents[endpoint1]
|
||||
|
||||
Reference in New Issue
Block a user