@@ -114,17 +114,6 @@ func key(prefix string, i int) string {
114114 return prefix + fmt .Sprintf ("%04d" , i )
115115}
116116
117- func buildTestTable (t * testing.T , prefix string , n int , opts table.Options ) * table.Table {
118- y .AssertTrue (n <= 10000 )
119- keyValues := make ([][]string , n )
120- for i := 0 ; i < n ; i ++ {
121- k := key (prefix , i )
122- v := fmt .Sprintf ("%d" , i )
123- keyValues [i ] = []string {k , v }
124- }
125- return buildTable (t , keyValues , opts )
126- }
127-
128117// TODO - Move these to somewhere where table package can also use it.
129118// keyValues is n by 2 where n is number of pairs.
130119func buildTable (t * testing.T , keyValues [][]string , bopts table.Options ) * table.Table {
@@ -162,6 +151,17 @@ func TestOverlappingKeyRangeError(t *testing.T) {
162151 // linter, I realized that the runCompactDef function below always returns error.
163152 t .Skip ()
164153
154+ buildTestTable := func (t * testing.T , prefix string , n int , opts table.Options ) * table.Table {
155+ y .AssertTrue (n <= 10000 )
156+ keyValues := make ([][]string , n )
157+ for i := 0 ; i < n ; i ++ {
158+ k := key (prefix , i )
159+ v := fmt .Sprintf ("%d" , i )
160+ keyValues [i ] = []string {k , v }
161+ }
162+ return buildTable (t , keyValues , opts )
163+ }
164+
165165 dir , err := os .MkdirTemp ("" , "badger-test" )
166166 require .NoError (t , err )
167167 defer removeDir (dir )
0 commit comments