Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Fix too many files open error on MacOS #4727

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions server/server_test.go
Expand Up @@ -1001,6 +1001,7 @@ func TestCompileV1Observability(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer disk.Close(ctx)
f := newFixtureWithStore(t, disk)

err = f.v1(http.MethodPut, "/policies/test", `package test
Expand Down Expand Up @@ -1579,6 +1580,7 @@ p = true { false }`
if err != nil {
t.Fatal(err)
}
defer disk.Close(ctx)
executeRequests(t, tc.reqs,
variant{"inmem", nil},
variant{"disk", []func(*Server){
Expand All @@ -1600,6 +1602,7 @@ func TestDataV1Metrics(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer disk.Close(ctx)

f := newFixtureWithStore(t, disk)
put := newReqV1(http.MethodPut, `/data?metrics`, `{"foo":"bar"}`)
Expand Down Expand Up @@ -1765,6 +1768,7 @@ func TestBundleScope(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer disk.Close(ctx)

for _, v := range []variant{
{"inmem", nil},
Expand Down Expand Up @@ -2406,6 +2410,7 @@ func TestDataMetricsEval(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer disk.Close(ctx)

f := newFixtureWithStore(t, disk)

Expand Down Expand Up @@ -3266,6 +3271,7 @@ func TestQueryV1(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer disk.Close(ctx)

f := newFixtureWithStore(t, disk)
get := newReqV1(http.MethodGet, `/query?q=a=[1,2,3]%3Ba[i]=x&metrics`, "")
Expand Down