diff options
Diffstat (limited to 'internal/postgres/path_test.go')
| -rw-r--r-- | internal/postgres/path_test.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/internal/postgres/path_test.go b/internal/postgres/path_test.go index 1b06d90b..e2b04d22 100644 --- a/internal/postgres/path_test.go +++ b/internal/postgres/path_test.go @@ -168,10 +168,7 @@ func TestUpsertPathsConcurrently(t *testing.T) { i := i go func() { start := (10 * i) % len(paths) - end := start + 50 - if end > len(paths) { - end = len(paths) - } + end := min(start+50, len(paths)) sub := paths[start:end] got, err := upsertPathsInTx(ctx, testDB.db, sub) if err == nil { |
