Skip to content

Commit

Permalink
sstable: fix testing bug that omitted Pebblev4 table format
Browse files Browse the repository at this point in the history
In #2829 some facilities for running tests against all table formats was
introduced, but it mistakenly used `< MaxTableFormat`, omitting the max table
format.
  • Loading branch information
jbowens committed Aug 17, 2023
1 parent d77c578 commit 856ed36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sstable/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const (
TableFormatPebblev4 // DELSIZED tombstones.
NumTableFormats

TableFormatMax = TableFormatPebblev4
TableFormatMax = NumTableFormats - 1
)

// TableFormatPebblev4, in addition to DELSIZED, introduces the use of
Expand Down
2 changes: 1 addition & 1 deletion sstable/reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ func forEveryTableFormat[I any](
t *testing.T, formatTable [NumTableFormats]I, runTest func(*testing.T, TableFormat, I),
) {
t.Helper()
for tf := TableFormatUnspecified + 1; tf < TableFormatMax; tf++ {
for tf := TableFormatUnspecified + 1; tf <= TableFormatMax; tf++ {
t.Run(tf.String(), func(t *testing.T) {
runTest(t, tf, formatTable[tf])
})
Expand Down

0 comments on commit 856ed36

Please sign in to comment.