Skip to content

Commit df921f1

Browse files
ever0deRaduBerinde
authored andcommitted
metamorphic: fix TestOptionsRoundtrip for TombstoneDenseCompactionThreshold
Add TombstoneDenseCompactionThreshold to the list of ignored function pointer fields in TestOptionsRoundtrip, and add a check to verify the function's return value matches after serialization/deserialization. This fixes test failures that occurred because function pointers differ after roundtrip serialization, even though the returned values are identical. The fix follows the existing pattern used for other function- typed options like EnableValueBlocks and DisableIngestAsFlushable.
1 parent e62a303 commit df921f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

metamorphic/options_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ func TestOptionsRoundtrip(t *testing.T) {
8585
"Experimental.RemoteStorage:",
8686
"Experimental.SingleDeleteInvariantViolationCallback:",
8787
"Experimental.EnableDeleteOnlyCompactionExcises:",
88+
"Experimental.TombstoneDenseCompactionThreshold:",
8889
"Experimental.ValueSeparationPolicy:",
8990
"Levels[0].Compression:",
9091
"Levels[1].Compression:",
@@ -116,6 +117,7 @@ func TestOptionsRoundtrip(t *testing.T) {
116117
expectEqualFn(t, o.Opts.Experimental.DisableIngestAsFlushable, parsed.Opts.Experimental.DisableIngestAsFlushable)
117118
expectEqualFn(t, o.Opts.Experimental.IngestSplit, parsed.Opts.Experimental.IngestSplit)
118119
expectEqualFn(t, o.Opts.Experimental.CompactionGarbageFractionForMaxConcurrency, parsed.Opts.Experimental.CompactionGarbageFractionForMaxConcurrency)
120+
expectEqualFn(t, o.Opts.Experimental.TombstoneDenseCompactionThreshold, parsed.Opts.Experimental.TombstoneDenseCompactionThreshold)
119121
expectEqualFn(t, o.Opts.Experimental.ValueSeparationPolicy, parsed.Opts.Experimental.ValueSeparationPolicy)
120122
expectEqualFn(t, o.Opts.TargetByteDeletionRate, parsed.Opts.TargetByteDeletionRate)
121123

0 commit comments

Comments
 (0)