Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit 669224a

Browse files
committed
fix(tests): handle error in goroutines test
Added error handling with proper panic message for failed User.FindUnique execution in the goroutines test.
1 parent ebf7c79 commit 669224a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/misc/goroutines/default_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package db
22

33
import (
44
"context"
5+
"fmt"
56
"testing"
67
"time"
78

@@ -50,7 +51,10 @@ func TestDisconnectConcurrent(t *testing.T) {
5051
case <-closeCh:
5152
loop = false
5253
default:
53-
client.User.FindUnique(User.ID.Equals(created.ID)).Exec(ctx)
54+
_, err := client.User.FindUnique(User.ID.Equals(created.ID)).Exec(ctx)
55+
if err != nil {
56+
panic(fmt.Errorf("find unique failed: %w", err))
57+
}
5458
}
5559
}
5660
}()

0 commit comments

Comments
 (0)