From 206797bda4685288de9a775b1536b9cbde0a7246 Mon Sep 17 00:00:00 2001 From: Daniel Hiltgen Date: Thu, 23 May 2024 13:12:14 -0700 Subject: [PATCH] Fix concurrency integration test to work locally This worked remotely but wound up trying to spawn multiple servers locally which doesn't work --- integration/concurrency_test.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/integration/concurrency_test.go b/integration/concurrency_test.go index f6bdb9d4..1f341fc3 100644 --- a/integration/concurrency_test.go +++ b/integration/concurrency_test.go @@ -45,10 +45,18 @@ func TestMultiModelConcurrency(t *testing.T) { wg.Add(len(req)) ctx, cancel := context.WithTimeout(context.Background(), time.Second*120) defer cancel() + + client, _, cleanup := InitServerConnection(ctx, t) + defer cleanup() + + for i := 0; i < len(req); i++ { + require.NoError(t, PullIfMissing(ctx, client, req[i].Model)) + } + for i := 0; i < len(req); i++ { go func(i int) { defer wg.Done() - GenerateTestHelper(ctx, t, req[i], resp[i]) + DoGenerate(ctx, t, client, req[i], resp[i], 30*time.Second, 10*time.Second) }(i) } wg.Wait()