[management] optimize test execution (#3204)

This commit is contained in:
Pascal Fischer
2025-02-19 19:13:45 +01:00
committed by GitHub
parent 27b3891b14
commit 7e6beee7f6
16 changed files with 1019 additions and 643 deletions
+4 -1
View File
@@ -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
})