Skip to content

Commit 6d1e29e

Browse files
committed
metamorphic: reduce test size for 32-bit
This test occasionally OOMs with `GOARCH=386`. Reduce the size of the test for 32-bit builds.
1 parent 6018d0e commit 6d1e29e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/metamorphic/metaflags/meta_flags.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"regexp"
1616
"strings"
1717
"time"
18+
"unsafe"
1819

1920
"github.com/cockroachdb/pebble/internal/buildtags"
2021
"github.com/cockroachdb/pebble/internal/randvar"
@@ -176,8 +177,9 @@ func initRunFlags(c *CommonFlags) *RunFlags {
176177
"write an execution trace to `<run-dir>/file`")
177178

178179
ops := "uniform:5000-10000"
179-
if buildtags.SlowBuild {
180-
// Reduce the size of the test under race (to avoid timeouts).
180+
if buildtags.SlowBuild || unsafe.Sizeof(uintptr(0)) == 4 {
181+
// Reduce the size of the test in slow builds (to avoid timeouts) or 32-bit
182+
// builds (to avoid OOMs).
181183
ops = "uniform:1000-2000"
182184
}
183185
if err := r.Ops.Set(ops); err != nil {

0 commit comments

Comments
 (0)