Even higher timeout with tests (#8394)

This commit is contained in:
Giulio rebuffo 2023-10-06 23:43:29 +02:00 committed by GitHub
parent 5a8e462f7f
commit 1775c40f78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 14 deletions

View File

@ -152,11 +152,11 @@ test3:
## test-integration: run integration tests with a 30m timeout
test-integration:
@cd erigon-lib && $(MAKE) test
$(GOTEST) --timeout 60m -tags $(BUILD_TAGS),integration
$(GOTEST) --timeout 120m -tags $(BUILD_TAGS),integration
test3-integration:
@cd erigon-lib && $(MAKE) test
$(GOTEST) --timeout 60m -tags $(BUILD_TAGS),integration,e3
$(GOTEST) --timeout 120m -tags $(BUILD_TAGS),integration,e3
## lint-deps: install lint dependencies
lint-deps:

View File

@ -586,7 +586,7 @@ func (ms *MockSentry) numberOfPoWBlocks(chain *core.ChainPack) int {
return chain.NumberOfPoWBlocks()
}
func (ms *MockSentry) insertPoWBlocks(chain *core.ChainPack, tx kv.RwTx) error {
func (ms *MockSentry) insertPoWBlocks(chain *core.ChainPack) error {
n := ms.numberOfPoWBlocks(chain)
if n == 0 {
// No Proof-of-Work blocks
@ -648,7 +648,8 @@ func (ms *MockSentry) insertPoWBlocks(chain *core.ChainPack, tx kv.RwTx) error {
}
initialCycle := MockInsertAsInitialCycle
hook := stages2.NewHook(ms.Ctx, ms.DB, ms.Notifications, ms.Sync, ms.BlockReader, ms.ChainConfig, ms.Log, ms.UpdateHead)
if err = stages2.StageLoopIteration(ms.Ctx, ms.DB, tx, ms.Sync, initialCycle, ms.Log, ms.BlockReader, hook, false); err != nil {
if err = stages2.StageLoopIteration(ms.Ctx, ms.DB, nil, ms.Sync, initialCycle, ms.Log, ms.BlockReader, hook, false); err != nil {
return err
}
if ms.TxPool != nil {
@ -707,16 +708,7 @@ func (ms *MockSentry) insertPoSBlocks(chain *core.ChainPack) error {
func (ms *MockSentry) InsertChain(chain *core.ChainPack) error {
tx, err := ms.DB.BeginRw(ms.Ctx)
if err != nil {
return err
}
defer tx.Rollback()
if err := ms.insertPoWBlocks(chain, tx); err != nil {
return err
}
if err := tx.Commit(); err != nil {
if err := ms.insertPoWBlocks(chain); err != nil {
return err
}
if err := ms.insertPoSBlocks(chain); err != nil {