'make bench' excluded the effect of test on the results (#205)

* Refactored Save function for config

* Refactored Save function for config

* 'make bench' excluded the effect of test on the results
This commit is contained in:
shiniao 2020-12-29 17:27:45 +08:00 committed by GitHub
parent cbbe36f0ae
commit 4f823851e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -37,7 +37,7 @@ profile: build
@go test -cpuprofile cpu.prof -memprofile mem.prof -v -bench .
bench: build
@go test -v -benchmem -bench=. .
@go test -v -run=XXX -benchmem -bench=. .
mocks:
@mockery -all -case underscore -output ./internal/mocks -recursive

View File

@ -12,9 +12,9 @@ import (
const testLockPath = "/tmp/bitcask_unit_test_lock" // file path to use for the lock
func TestTryLock(t *testing.T) {
// test that basic locking functionnalities are consistent
// test that basic locking functionalities are consistent
// make sure there is no present lock when startng this test
// make sure there is no present lock when starting this test
os.Remove(testLockPath)
assert := assert.New(t)
@ -48,7 +48,7 @@ func TestTryLock(t *testing.T) {
func TestLock(t *testing.T) {
assert := assert.New(t)
// make sure there is no present lock when startng this test
// make sure there is no present lock when starting this test
os.Remove(testLockPath)
syncChan := make(chan bool)
@ -96,7 +96,7 @@ func TestErrorConditions(t *testing.T) {
// -- setup
assert := assert.New(t)
// make sure there is no present lock when startng this test
// make sure there is no present lock when starting this test
os.Remove(testLockPath)
lock := New(testLockPath)