add badger markset test

This commit is contained in:
vyzo 2021-07-22 12:16:44 +03:00
parent 54a6968327
commit 2c26abc551
2 changed files with 10 additions and 1 deletions

View File

@ -29,7 +29,7 @@ type BadgerMarkSet struct {
var _ MarkSet = (*BadgerMarkSet)(nil)
const badgerMarkSetBatchSize = 65536
var badgerMarkSetBatchSize = 65536
func NewBadgerMarkSetEnv(path string) (MarkSetEnv, error) {
msPath := filepath.Join(path, "markset.badger")

View File

@ -16,6 +16,15 @@ func TestBloomMarkSet(t *testing.T) {
testMarkSet(t, "bloom")
}
func TestBadgerMarkSet(t *testing.T) {
bs := badgerMarkSetBatchSize
badgerMarkSetBatchSize = 1
t.Cleanup(func() {
badgerMarkSetBatchSize = bs
})
testMarkSet(t, "badger")
}
func testMarkSet(t *testing.T, lsType string) {
t.Helper()