From 10f183ea14fe7ba222e84beaff95f937b5e19b40 Mon Sep 17 00:00:00 2001 From: Edward Xiao Date: Thu, 9 Jan 2025 16:50:23 -0500 Subject: [PATCH] add explicit check for CI in tests --- sstable/rowblk/rowblk_iter_test.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sstable/rowblk/rowblk_iter_test.go b/sstable/rowblk/rowblk_iter_test.go index 6da89c75fd..c76639ae04 100644 --- a/sstable/rowblk/rowblk_iter_test.go +++ b/sstable/rowblk/rowblk_iter_test.go @@ -8,6 +8,7 @@ import ( "bytes" "fmt" "math" + "os" "runtime" "strconv" "strings" @@ -467,7 +468,10 @@ func TestBlockSyntheticSuffix(t *testing.T) { func TestSingularKVBlockRestartsOverflow(t *testing.T) { - t.Skip("Skipping test: requires too much memory for CI now.") + _, isCI := os.LookupEnv("CI") + if isCI { + t.Skip("Skipping test: requires too much memory for CI now.") + } // Test that SeekGE() and SeekLT() function correctly // with a singular large KV > 2GB. @@ -511,7 +515,10 @@ func TestSingularKVBlockRestartsOverflow(t *testing.T) { func TestBufferExceeding256MBShouldPanic(t *testing.T) { - t.Skip("Skipping test: requires too much memory for CI now.") + _, isCI := os.LookupEnv("CI") + if isCI { + t.Skip("Skipping test: requires too much memory for CI now.") + } // Test that writing to a block that is already >= 256MiB // causes a panic to occur. @@ -559,7 +566,10 @@ func TestBufferExceeding256MBShouldPanic(t *testing.T) { func TestMultipleKVBlockRestartsOverflow(t *testing.T) { - t.Skip("Skipping test: requires too much memory for CI now.") + _, isCI := os.LookupEnv("CI") + if isCI { + t.Skip("Skipping test: requires too much memory for CI now.") + } // Tests that SeekGE() works when iter.restarts is // greater than math.MaxUint32 for multiple KVs.