add badger markset test
This commit is contained in:
parent
54a6968327
commit
2c26abc551
@ -29,7 +29,7 @@ type BadgerMarkSet struct {
|
|||||||
|
|
||||||
var _ MarkSet = (*BadgerMarkSet)(nil)
|
var _ MarkSet = (*BadgerMarkSet)(nil)
|
||||||
|
|
||||||
const badgerMarkSetBatchSize = 65536
|
var badgerMarkSetBatchSize = 65536
|
||||||
|
|
||||||
func NewBadgerMarkSetEnv(path string) (MarkSetEnv, error) {
|
func NewBadgerMarkSetEnv(path string) (MarkSetEnv, error) {
|
||||||
msPath := filepath.Join(path, "markset.badger")
|
msPath := filepath.Join(path, "markset.badger")
|
||||||
|
@ -16,6 +16,15 @@ func TestBloomMarkSet(t *testing.T) {
|
|||||||
testMarkSet(t, "bloom")
|
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) {
|
func testMarkSet(t *testing.T, lsType string) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user