@@ -174,7 +174,7 @@ func TestSSTable_ConcurrentAccess(t *testing.T) {
174174 }
175175 }
176176
177- forceManyWrites (t , db , 100 )
177+ testForceManyWrites (t , db , 100 )
178178 time .Sleep (500 * time .Millisecond ) // Allow background flush to complete
179179
180180 // Number of concurrent readers and operations per reader
@@ -297,9 +297,10 @@ func TestSSTable_ConcurrentAccess(t *testing.T) {
297297 }
298298}
299299
300- // Helper function to force a flush to SSTable by writing many keys
301- func forceManyWrites (t * testing.T , db * DB , count int ) {
302- // Write enough data to trigger memtable flush
300+ // forceManyWrites Helper function to force a flush to SSTable by writing many keys
301+ func testForceManyWrites (t * testing.T , db * DB , count int ) {
302+
303+ // Write enough data to trigger memtable flush(es) for testing
303304 for i := 0 ; i < count ; i ++ {
304305 key := fmt .Sprintf ("flush_key%d" , i )
305306 value := fmt .Sprintf ("flush_value%d" , i )
@@ -313,19 +314,6 @@ func forceManyWrites(t *testing.T, db *DB, count int) {
313314 }
314315}
315316
316- // Helper function to check if a byte slice starts with a prefix
317- func startsWith (data , prefix []byte ) bool {
318- if len (data ) < len (prefix ) {
319- return false
320- }
321- for i := 0 ; i < len (prefix ); i ++ {
322- if data [i ] != prefix [i ] {
323- return false
324- }
325- }
326- return true
327- }
328-
329317func TestSSTable_MVCCWithMultipleVersions (t * testing.T ) {
330318 dir , err := os .MkdirTemp ("" , "db_sstable_mvcc_multiple_versions_test" )
331319 if err != nil {
0 commit comments