Skip to content

Commit

Permalink
del: Delete test t.Log
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyJius committed May 9, 2023
1 parent ca83069 commit 191e293
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 19 deletions.
3 changes: 0 additions & 3 deletions batch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions db_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package flydb

import (
"fmt"
"github.com/qishenonly/flydb/utils"
"github.com/stretchr/testify/assert"
"os"
Expand All @@ -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)
Expand Down Expand Up @@ -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)
}
}
Expand All @@ -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)
Expand Down
5 changes: 0 additions & 5 deletions iterator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

Expand All @@ -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())
}

Expand All @@ -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())
}

Expand Down
2 changes: 0 additions & 2 deletions merge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ func TestDB_Merge(t *testing.T) {
assert.NotNil(t, db)

err = db.Merge()
t.Log(err)
assert.Nil(t, err)
}

Expand All @@ -39,7 +38,6 @@ func TestDB_Merge2(t *testing.T) {
}

err = db.Merge()
t.Log(err)
assert.Nil(t, err)

// 重启校验
Expand Down

0 comments on commit 191e293

Please sign in to comment.