add kindJaegerUdp

This commit is contained in:
xiandong
2023-02-17 12:58:31 +08:00
committed by kevin
parent 21566f1b7a
commit 77a72b16e9
3 changed files with 38 additions and 5 deletions

View File

@@ -15,6 +15,7 @@ func TestStartAgent(t *testing.T) {
endpoint2 = "remotehost:1234"
endpoint3 = "localhost:1235"
endpoint4 = "localhost:1236"
endpoint5 = "localhost:6831"
)
c1 := Config{
Name: "foo",
@@ -44,6 +45,11 @@ func TestStartAgent(t *testing.T) {
Endpoint: endpoint4,
Batcher: kindOtlpHttp,
}
c7 := Config{
Name: "UDP",
Endpoint: endpoint5,
Batcher: kindJaegerUdp,
}
StartAgent(c1)
StartAgent(c1)
@@ -52,6 +58,7 @@ func TestStartAgent(t *testing.T) {
StartAgent(c4)
StartAgent(c5)
StartAgent(c6)
StartAgent(c7)
lock.Lock()
defer lock.Unlock()
@@ -64,4 +71,6 @@ func TestStartAgent(t *testing.T) {
assert.True(t, ok)
_, ok = agents[endpoint2]
assert.False(t, ok)
_, ok = agents[endpoint5]
assert.True(t, ok)
}