Skip to content

Commit

Permalink
storage: don't import testing for `DisableMetamorphicSimpleValueEnc…
Browse files Browse the repository at this point in the history
…oding`

We shouldn't link `testing` in binaries.

Epic: none
Release note: None
  • Loading branch information
erikgrinaker committed Aug 1, 2023
1 parent 5c54cd9 commit b67f136
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/storage/mvcc_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ package storage

import (
"encoding/binary"
"testing"

"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/storage/enginepb"
Expand Down Expand Up @@ -147,7 +146,10 @@ var disableSimpleValueEncoding = util.ConstantWithMetamorphicTestBool(

// DisableMetamorphicSimpleValueEncoding disables the disableSimpleValueEncoding
// metamorphic bool for the duration of a test, resetting it at the end.
func DisableMetamorphicSimpleValueEncoding(t testing.TB) {
func DisableMetamorphicSimpleValueEncoding(t interface {
Helper()
Cleanup(func())
}) {
t.Helper()
if disableSimpleValueEncoding {
disableSimpleValueEncoding = false
Expand Down

0 comments on commit b67f136

Please sign in to comment.