Skip to content

[R4R] fix asynchronous caching of difflayer causes random errors in tests#976

Merged
unclezoro merged 1 commit intobnb-chain:developfrom
j75689:fix/difflayer_ut
Jul 6, 2022
Merged

[R4R] fix asynchronous caching of difflayer causes random errors in tests#976
unclezoro merged 1 commit intobnb-chain:developfrom
j75689:fix/difflayer_ut

Conversation

@j75689
Copy link
Copy Markdown
Contributor

@j75689 j75689 commented Jul 6, 2022

Description

image

Rationale

Because #926 introduces the implementation of asynchronous cache Difflayer, it may obtain DiffLayer when the cache is not completed during testing.

Example

go test -timeout 30m -run ^TestFastNode$ github.com/ethereum/go-ethereum/core
go test -timeout 30s -run ^TestGetRootByDiffHash$ github.com/ethereum/go-ethereum/core

Changes

Notable changes:

  • core/blockchain_diff_test.go
  • core/blockchain_notries_test.go

@j75689 j75689 force-pushed the fix/difflayer_ut branch from 0d381fd to b6c02a4 Compare July 6, 2022 07:43
@j75689 j75689 changed the title fix: asynchronous caching of difflayer causes random errors in tests [R4R] fix asynchronous caching of difflayer causes random errors in tests Jul 6, 2022
Copy link
Copy Markdown
Contributor

@brilliant-lx brilliant-lx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

@unclezoro unclezoro merged commit 552e404 into bnb-chain:develop Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants