Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ script:
- bash build.sh
- go test -v -race -failfast -parallel 16 -cpu 16 $(go list ./... | grep -v "/vendor/") -coverprofile cover.out
- cd rpc && go test -test.bench ^BenchmarkPersistentCaller_Call$ -test.run ^$ && cd -
- bash cleanupDB.sh || true
- cd cmd/cql-minerd && go test -bench=^BenchmarkMinerTwo$ -benchtime=5s -run ^$ && cd -
- gocovmerge cover.out $(find cmd -name "*.cover.out") | grep -F -v '_gen.go' > coverage.txt && rm -f cover.out
- bash <(curl -s https://codecov.io/bash)
- >-
Expand Down
30 changes: 15 additions & 15 deletions cmd/cql-minerd/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,28 +487,28 @@ func benchDB(b *testing.B, db *sql.DB, createDB bool) {
func benchMiner(b *testing.B, minerCount uint16, bypassSign bool) {
log.Warnf("Benchmark for %d Miners, BypassSignature: %v", minerCount, bypassSign)
asymmetric.BypassSignature = bypassSign
//if minerCount > 0 {
// startNodesProfile(bypassSign)
// utils.WaitToConnect(context.Background(), "127.0.0.1", []int{
// 2144,
// 2145,
// 2146,
// 3122,
// 3121,
// 3120,
// }, 2*time.Second)
// time.Sleep(time.Second)
//}
if minerCount > 0 {
startNodesProfile(bypassSign)
utils.WaitToConnect(context.Background(), "127.0.0.1", []int{
2144,
2145,
2146,
3122,
3121,
3120,
}, 2*time.Second)
time.Sleep(time.Second)
}

// Create temp directory
testDataDir, err := ioutil.TempDir(testWorkingDir, "covenantsql")
if err != nil {
panic(err)
}
defer os.RemoveAll(testDataDir)
clientConf := FJ(testWorkingDir, "./service/node_c/config.yaml")
clientConf := FJ(testWorkingDir, "./integration/node_c/config.yaml")
tempConf := FJ(testDataDir, "config.yaml")
clientKey := FJ(testWorkingDir, "./service/node_c/private.key")
clientKey := FJ(testWorkingDir, "./integration/node_c/private.key")
tempKey := FJ(testDataDir, "private.key")
utils.CopyFile(clientConf, tempConf)
utils.CopyFile(clientKey, tempKey)
Expand Down Expand Up @@ -536,7 +536,7 @@ func benchMiner(b *testing.B, minerCount uint16, bypassSign bool) {
db, err := sql.Open("covenantsql", dsn)
So(err, ShouldBeNil)

benchDB(b, db, true)
benchDB(b, db, minerCount > 0)

err = client.Drop(dsn)
So(err, ShouldBeNil)
Expand Down