@@ -514,9 +514,12 @@ func TestPebbleStore_Restore_NativePebbleAtomic(t *testing.T) {
514514}
515515
516516// TestPebbleStore_PutAt_ValueTooLarge verifies that PutAt rejects values
517- // exceeding maxSnapshotValueSize (256 MiB) to ensure write and restore are
518- // consistent.
517+ // exceeding maxSnapshotValueSize to ensure write and restore are consistent.
519518func TestPebbleStore_PutAt_ValueTooLarge (t * testing.T ) {
519+ orig := maxSnapshotValueSize
520+ maxSnapshotValueSize = 100
521+ t .Cleanup (func () { maxSnapshotValueSize = orig })
522+
520523 dir , err := os .MkdirTemp ("" , "pebble-value-limit-*" )
521524 require .NoError (t , err )
522525 defer os .RemoveAll (dir )
@@ -535,6 +538,10 @@ func TestPebbleStore_PutAt_ValueTooLarge(t *testing.T) {
535538// TestPebbleStore_ApplyMutations_ValueTooLarge verifies that ApplyMutations
536539// rejects Put mutations with values exceeding maxSnapshotValueSize.
537540func TestPebbleStore_ApplyMutations_ValueTooLarge (t * testing.T ) {
541+ orig := maxSnapshotValueSize
542+ maxSnapshotValueSize = 100
543+ t .Cleanup (func () { maxSnapshotValueSize = orig })
544+
538545 dir , err := os .MkdirTemp ("" , "pebble-apply-value-limit-*" )
539546 require .NoError (t , err )
540547 defer os .RemoveAll (dir )
@@ -555,6 +562,10 @@ func TestPebbleStore_ApplyMutations_ValueTooLarge(t *testing.T) {
555562// TestMVCCStore_PutAt_ValueTooLarge verifies that the in-memory mvccStore
556563// also rejects oversized values.
557564func TestMVCCStore_PutAt_ValueTooLarge (t * testing.T ) {
565+ orig := maxSnapshotValueSize
566+ maxSnapshotValueSize = 100
567+ t .Cleanup (func () { maxSnapshotValueSize = orig })
568+
558569 s := NewMVCCStore ()
559570 defer s .Close ()
560571
@@ -568,6 +579,10 @@ func TestMVCCStore_PutAt_ValueTooLarge(t *testing.T) {
568579// TestMVCCStore_ApplyMutations_ValueTooLarge verifies that the in-memory
569580// mvccStore rejects oversized Put mutations.
570581func TestMVCCStore_ApplyMutations_ValueTooLarge (t * testing.T ) {
582+ orig := maxSnapshotValueSize
583+ maxSnapshotValueSize = 100
584+ t .Cleanup (func () { maxSnapshotValueSize = orig })
585+
571586 s := NewMVCCStore ()
572587 defer s .Close ()
573588
0 commit comments