integration testing scripts #64

Merged
jeffreypicard merged 8 commits from integration_testing into master 2022-10-04 19:25:44 +02:00
2 changed files with 8 additions and 1 deletions
Showing only changes of commit f086dd0d57 - Show all commits

View file

@ -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})

View file

@ -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