diff --git a/batch_test.go b/batch_test.go index 1925f239..26115878 100644 --- a/batch_test.go +++ b/batch_test.go @@ -92,9 +92,6 @@ func TestDB_WriteBatch1(t *testing.T) { assert.Nil(t, err) assert.NotNil(t, db) - //keys := db.GetListKeys() - //t.Log(len(keys)) - // 批量提交中间手动停止 wbopt := DefaultWriteBatchOptions wbopt.MaxBatchNum = 1000000 diff --git a/db_test.go b/db_test.go index b17293e3..34af14f2 100644 --- a/db_test.go +++ b/db_test.go @@ -1,7 +1,6 @@ package flydb import ( - "fmt" "github.com/qishenonly/flydb/utils" "github.com/stretchr/testify/assert" "os" @@ -24,7 +23,6 @@ func destroyDB(db *DB) { func TestNewFlyDB(t *testing.T) { opts := DefaultOptions dir, _ := os.MkdirTemp("", "flydb") - fmt.Println("dir=>>", dir) opts.DirPath = dir db, err := NewFlyDB(opts) defer destroyDB(db) @@ -242,7 +240,6 @@ func TestDB_GetListKeys(t *testing.T) { keys3 := db.GetListKeys() assert.Equal(t, 4, len(keys3)) for _, value := range keys3 { - //t.Log(string(value)) assert.NotNil(t, value) } } @@ -269,12 +266,6 @@ func TestDB_Fold(t *testing.T) { err = db.Fold(func(key []byte, value []byte) bool { assert.NotNil(t, key) assert.NotNil(t, value) - // eg ==> - // t.Log(string(key)) - // t.Log(string(value)) - // if bytes.Compare(key, utils.GetTestKey(20)) == 0 { - // return false - // } return true }) assert.Nil(t, err) diff --git a/iterator_test.go b/iterator_test.go index 4ea21d67..375bdebe 100644 --- a/iterator_test.go +++ b/iterator_test.go @@ -61,13 +61,11 @@ func TestDB_Iterator_Multi_Value(t *testing.T) { // 正向迭代 itertor1 := db.NewIterator(DefaultIteratorOptions) for itertor1.Rewind(); itertor1.Valid(); itertor1.Next() { - //t.Log("key => ", string(itertor1.Key())) assert.NotNil(t, itertor1.Key()) } itertor1.Rewind() for itertor1.Seek([]byte("c")); itertor1.Valid(); itertor1.Next() { - t.Log("key => ", string(itertor1.Key())) assert.NotNil(t, itertor1.Key()) } @@ -76,13 +74,11 @@ func TestDB_Iterator_Multi_Value(t *testing.T) { iterOpt2.Reverse = true itertor2 := db.NewIterator(iterOpt2) for itertor2.Rewind(); itertor2.Valid(); itertor2.Next() { - //t.Log("key => ", string(itertor2.Key())) assert.NotNil(t, itertor2.Key()) } itertor2.Rewind() for itertor2.Seek([]byte("c")); itertor2.Valid(); itertor2.Next() { - //t.Log("key => ", string(itertor2.Key())) assert.NotNil(t, itertor2.Key()) } @@ -91,7 +87,6 @@ func TestDB_Iterator_Multi_Value(t *testing.T) { iterOpt3.Prefix = []byte("ae") itertor3 := db.NewIterator(iterOpt3) for itertor3.Rewind(); itertor3.Valid(); itertor3.Next() { - //t.Log("key => ", string(itertor3.Key())) assert.NotNil(t, itertor3.Key()) } diff --git a/merge_test.go b/merge_test.go index 2e101895..d5bfabcf 100644 --- a/merge_test.go +++ b/merge_test.go @@ -18,7 +18,6 @@ func TestDB_Merge(t *testing.T) { assert.NotNil(t, db) err = db.Merge() - t.Log(err) assert.Nil(t, err) } @@ -39,7 +38,6 @@ func TestDB_Merge2(t *testing.T) { } err = db.Merge() - t.Log(err) assert.Nil(t, err) // 重启校验