-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sovereign chain simulator updates #6773
sovereign chain simulator updates #6773
Conversation
@@ -76,6 +79,112 @@ func TestChainSimulator_GenerateBlocksShouldWork(t *testing.T) { | |||
require.Nil(t, err) | |||
} | |||
|
|||
func TestSovereignChainSimulator_GenerateBlocksAndEpochChangeShouldWork(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests are duplicated from:
1.TestChainSimulator_GenerateBlocksAndEpochChangeShouldWork
2. TestSimulator_TriggerChangeOfEpoch
Also, I think we can delete that time.Sleep
if it works regardless
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could add a common test functoinality with chainSimulator interface in which you pass which node(shardID) to use
cmd/sovereignnode/chainSimulator/sovereignChainSimulator_test.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TestChainSimulator_GenerateBlocksAndEpochChangeShouldWork
still not refactored
@@ -18,6 +18,17 @@ import ( | |||
"github.com/stretchr/testify/require" | |||
) | |||
|
|||
// TriggerChangeOfEpoch - | |||
func TriggerChangeOfEpoch(t *testing.T, chainSimulator ChainSimulator, nodeHandler chainSimulatorProcess.NodeHandler) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This func can definelty fail if called from any other epoch than 0.
We can do it better and iterate from i:= currentEpoch; i< currentEpoch+4
Reasoning behind the pull request
Proposed changes
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?