Skip to content

Commit

Permalink
Fix test-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
cffls committed Sep 19, 2024
1 parent 97c1dc9 commit a902cd1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
18 changes: 18 additions & 0 deletions tests/bor/bor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ func TestForkWithBlockTime(t *testing.T) {
},
}

log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stderr, log.LevelInfo, true)))
fdlimit.Raise(2048)

// Create an Ethash network based off of the Ropsten config
// Generate a batch of accounts to seal and fund with
faucets := make([]*ecdsa.PrivateKey, 128)
Expand Down Expand Up @@ -314,6 +317,7 @@ func TestForkWithBlockTime(t *testing.T) {
defer wg.Done()

for range ticker.C {
log.Info("Fetching header", "node", i, "sprint", test.sprint["0"], "change", test.change, "number", test.sprint["0"]*test.change+10)
blockHeaders[i] = nodes[i].BlockChain().GetHeaderByNumber(test.sprint["0"]*test.change + 10)
if blockHeaders[i] != nil {
break
Expand Down Expand Up @@ -367,6 +371,9 @@ func TestForkWithBlockTime(t *testing.T) {
}

func TestInsertingSpanSizeBlocks(t *testing.T) {
log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stderr, log.LevelInfo, true)))
fdlimit.Raise(2048)

init := buildEthereumInstance(t, rawdb.NewMemoryDatabase())
chain := init.ethereum.BlockChain()
engine := init.ethereum.Engine()
Expand Down Expand Up @@ -430,6 +437,9 @@ func TestInsertingSpanSizeBlocks(t *testing.T) {
}

func TestFetchStateSyncEvents(t *testing.T) {
log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stderr, log.LevelInfo, true)))
fdlimit.Raise(2048)

init := buildEthereumInstance(t, rawdb.NewMemoryDatabase())
chain := init.ethereum.BlockChain()
engine := init.ethereum.Engine()
Expand Down Expand Up @@ -505,6 +515,9 @@ func validateStateSyncEvents(t *testing.T, expected []*clerk.EventRecordWithTime
}

func TestFetchStateSyncEvents_2(t *testing.T) {
log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stderr, log.LevelInfo, true)))
fdlimit.Raise(2048)

init := buildEthereumInstance(t, rawdb.NewMemoryDatabase())
chain := init.ethereum.BlockChain()
engine := init.ethereum.Engine()
Expand Down Expand Up @@ -607,6 +620,9 @@ func TestFetchStateSyncEvents_2(t *testing.T) {
}

func TestOutOfTurnSigning(t *testing.T) {
log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stderr, log.LevelInfo, true)))
fdlimit.Raise(2048)

init := buildEthereumInstance(t, rawdb.NewMemoryDatabase())
chain := init.ethereum.BlockChain()
engine := init.ethereum.Engine()
Expand Down Expand Up @@ -701,6 +717,8 @@ func TestOutOfTurnSigning(t *testing.T) {
}

func TestSignerNotFound(t *testing.T) {
log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stderr, log.LevelInfo, true)))
fdlimit.Raise(2048)
init := buildEthereumInstance(t, rawdb.NewMemoryDatabase())
chain := init.ethereum.BlockChain()
engine := init.ethereum.Engine()
Expand Down
5 changes: 3 additions & 2 deletions tests/bor/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ func buildEthereumInstance(t *testing.T, db ethdb.Database) *initializeData {
}

ethConf := &eth.Config{
Genesis: gen,
BorLogs: true,
Genesis: gen,
BorLogs: true,
StateScheme: "hash",
}

ethConf.Genesis.MustCommit(db, triedb.NewDatabase(db, triedb.HashDefaults))
Expand Down

0 comments on commit a902cd1

Please sign in to comment.