Skip to content

Commit

Permalink
decrease batch write unit test time (#487)
Browse files Browse the repository at this point in the history
* add list merge

* add unit test for some func

* optimize some code

* decrease batch write unit test time

---------

Co-authored-by: huyp3 <huyp3@chinatelecom.cn>
  • Loading branch information
damotiansheng and huyp3 committed Nov 7, 2023
1 parent a9d6315 commit bc3393e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions batch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const (
fileDir7 = "/tmp/nutsdb/nutsdb_batch_write7"
fileDir8 = "/tmp/nutsdb/nutsdb_batch_write8"
fileDir9 = "/tmp/nutsdb/nutsdb_batch_write9"
N = 10000
N = 100
)

func init() {
Expand Down Expand Up @@ -140,25 +140,25 @@ func TestBatchWrite(t *testing.T) {
DefaultOptions,
WithDir(fileDir4),
WithEntryIdxMode(HintKeyValAndRAMIdxMode),
WithMaxBatchCount(195),
WithMaxBatchCount(35),
)
dbs[3], _ = Open(
DefaultOptions,
WithDir(fileDir5),
WithEntryIdxMode(HintKeyAndRAMIdxMode),
WithMaxBatchCount(195),
WithMaxBatchCount(35),
)
dbs[4], _ = Open(
DefaultOptions,
WithDir(fileDir7),
WithEntryIdxMode(HintKeyValAndRAMIdxMode),
WithMaxBatchSize(1000), // change to 1000, unit test is not ok, 1000000 is ok
WithMaxBatchSize(20), // change to 1000, unit test is not ok, 1000000 is ok
)
dbs[5], _ = Open(
DefaultOptions,
WithDir(fileDir8),
WithEntryIdxMode(HintKeyAndRAMIdxMode),
WithMaxBatchSize(1000),
WithMaxBatchSize(20),
)

for _, db := range dbs {
Expand Down

0 comments on commit bc3393e

Please sign in to comment.