mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-22 13:29:08 +02:00
[management] optimize test execution (#3204)
This commit is contained in:
@@ -258,8 +258,11 @@ func TestClient_Sync(t *testing.T) {
|
||||
|
||||
ch := make(chan *mgmtProto.SyncResponse, 1)
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
go func() {
|
||||
err = client.Sync(context.Background(), info, func(msg *mgmtProto.SyncResponse) error {
|
||||
err = client.Sync(ctx, info, func(msg *mgmtProto.SyncResponse) error {
|
||||
ch <- msg
|
||||
return nil
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user