integration testing scripts #64
2 changed files with 8 additions and 1 deletions
4
db/db.go
4
db/db.go
|
@ -606,6 +606,8 @@ func GetDBColumnFamilies(name string, secondayPath string, cfNames []string) (*R
|
||||||
LastState: nil,
|
LastState: nil,
|
||||||
Height: 0,
|
Height: 0,
|
||||||
Headers: nil,
|
Headers: nil,
|
||||||
|
OpenIterators: make(map[string][]chan struct{}),
|
||||||
|
ItMut: sync.RWMutex{},
|
||||||
ShutdownChan: make(chan struct{}, 1),
|
ShutdownChan: make(chan struct{}, 1),
|
||||||
DoneChan: make(chan struct{}, 1),
|
DoneChan: make(chan struct{}, 1),
|
||||||
}
|
}
|
||||||
|
@ -1080,7 +1082,7 @@ func GenerateTestData(prefix byte, fileName string) {
|
||||||
log.Fatalln(err)
|
log.Fatalln(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
options := NewIterateOptions().WithDB(db)
|
options := NewIterateOptions()
|
||||||
options.WithRawKey(true).WithRawValue(true).WithIncludeValue(true)
|
options.WithRawKey(true).WithRawValue(true).WithIncludeValue(true)
|
||||||
options.WithPrefix([]byte{prefix})
|
options.WithPrefix([]byte{prefix})
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
dbpkg "github.com/lbryio/herald.go/db"
|
dbpkg "github.com/lbryio/herald.go/db"
|
||||||
|
@ -93,6 +94,10 @@ func OpenAndFillTmpDBColumnFamlies(filePath string) (*dbpkg.ReadOnlyDBColumnFami
|
||||||
LastState: nil,
|
LastState: nil,
|
||||||
Height: 0,
|
Height: 0,
|
||||||
Headers: nil,
|
Headers: nil,
|
||||||
|
OpenIterators: make(map[string][]chan struct{}),
|
||||||
|
ItMut: sync.RWMutex{},
|
||||||
|
ShutdownChan: make(chan struct{}, 1),
|
||||||
|
DoneChan: make(chan struct{}, 1),
|
||||||
}
|
}
|
||||||
|
|
||||||
// err = dbpkg.ReadDBState(myDB) //TODO: Figure out right place for this
|
// err = dbpkg.ReadDBState(myDB) //TODO: Figure out right place for this
|
||||||
|
|
Loading…
Reference in a new issue