fn name
All checks were successful
Test / Run unit tests (pull_request) Successful in 17m52s
Test / Run integration tests (pull_request) Successful in 35m2s

This commit is contained in:
Roy Crihfield 2023-09-19 14:40:57 +08:00
parent fc54269146
commit 2446393db4
5 changed files with 5 additions and 6 deletions

View File

@ -45,7 +45,6 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
path: ./plugeth-statediff path: ./plugeth-statediff
# TODO: replace with release
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
repository: cerc-io/plugeth repository: cerc-io/plugeth

View File

@ -38,7 +38,7 @@ import (
) )
func init() { func init() {
test_helpers.SilenceLogs() test_helpers.QuietLogs()
} }
var ( var (

View File

@ -41,7 +41,7 @@ import (
) )
func init() { func init() {
test_helpers.SilenceLogs() test_helpers.QuietLogs()
} }
func TestServiceLoop(t *testing.T) { func TestServiceLoop(t *testing.T) {

View File

@ -6,9 +6,9 @@ import (
"github.com/cerc-io/plugeth-statediff/utils/log" "github.com/cerc-io/plugeth-statediff/utils/log"
) )
// SilenceLogs silences the geth logs and sets the plugin test log level to "warning" // QuietLogs silences the geth logs and sets the plugin test log level to "warning"
// The geth sync logs are noisy, so it can be nice to silence them. // The geth sync logs are noisy, so it can be nice to silence them.
func SilenceLogs() { func QuietLogs() {
geth_log.Root().SetHandler(geth_log.DiscardHandler()) geth_log.Root().SetHandler(geth_log.DiscardHandler())
log.TestLogger.SetLevel(2) log.TestLogger.SetLevel(2)
} }

View File

@ -177,7 +177,7 @@ func TestSymmetricDifferenceIterator(t *testing.T) {
// compare the paths traversed by the geth difference iterator and symmetric difference iterator // compare the paths traversed by the geth difference iterator and symmetric difference iterator
// within a sample of mainnet data. // within a sample of mainnet data.
func TestCompareDifferenceIterators(t *testing.T) { func TestCompareDifferenceIterators(t *testing.T) {
test_helpers.SilenceLogs() test_helpers.QuietLogs()
db := rawdb.NewMemoryDatabase() db := rawdb.NewMemoryDatabase()
core.DefaultGenesisBlock().MustCommit(db) core.DefaultGenesisBlock().MustCommit(db)