优化代码

This commit is contained in:
GoEdgeLab
2023-08-08 11:36:54 +08:00
parent 069635ddbf
commit 1ab328bb02
4 changed files with 7 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ func TestHTTPClientPool_Client(t *testing.T) {
Version: 2,
Addr: &serverconfigs.NetworkAddressConfig{Host: "127.0.0.1", PortRange: "1234"},
}
err := origin.Init(nil)
err := origin.Init(context.Background())
if err != nil {
t.Fatal(err)
}

View File

@@ -3,6 +3,7 @@
package nodes
import (
"context"
"github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
"github.com/iwind/TeaGo/types"
@@ -23,7 +24,7 @@ func TestBaseListener_FindServer(t *testing.T) {
{Name: types.String(i) + ".hello.com"},
},
}
_ = server.Init(nil)
_ = server.Init(context.Background())
listener.Group.Add(server)
}