diff options
| author | Jakob Unterwurzacher | 2026-07-16 21:01:01 +0200 |
|---|---|---|
| committer | Jakob Unterwurzacher | 2026-07-16 21:01:01 +0200 |
| commit | 6a098702f11f1c2c9f5a3d102c56c3b9232719eb (patch) | |
| tree | 96be5dd749db1ba3438c7f2cecd28421efb5da6b /tests | |
| parent | c3f386d511094362ad5bb28c3a5c6c4f52a77236 (diff) | |
tests/cluster: fix possible fd exhaustion
...and one typo.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/cluster/cluster_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/cluster/cluster_test.go b/tests/cluster/cluster_test.go index fa639b7..70a2a02 100644 --- a/tests/cluster/cluster_test.go +++ b/tests/cluster/cluster_test.go @@ -176,6 +176,10 @@ func TestConcurrentCreate(t *testing.T) { return } syscall.Unlink(path) + + // Close now (not only when the whole loop exists) to avoid exhausting fds. + // Double-close on happy path is harmless: "Close will return an error if it has already been called" + f.Close() } } |
