Skip to content
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

test(server/v2): Add system-test for store's command #21357

Merged
merged 19 commits into from
Sep 23, 2024

Conversation

hieuvubk
Copy link
Contributor

@hieuvubk hieuvubk commented Aug 19, 2024

Description

Closes: #21184

Add system-test for snapshots & prune
Currently v1 TestSnapshots failed because of #21404

Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Introduced a new method for executing CLI commands with arguments, improving clarity and testing capabilities.
    • Added comprehensive system tests for snapshot management, covering creation, listing, dumping, deletion, loading, and restoration.
    • Implemented methods for starting and stopping individual validator nodes, enhancing control over testing environments.
  • Bug Fixes

    • Improved validation of snapshot restoration processes to prevent errors related to unexpected payload states.

@hieuvubk hieuvubk requested a review from a team as a code owner August 19, 2024 13:01
Copy link
Contributor

coderabbitai bot commented Aug 19, 2024

📝 Walkthrough

Walkthrough

The recent changes introduce enhanced testing capabilities for a blockchain application, focusing on CLI command execution and snapshot management. A new method for running commands with arguments was added, along with comprehensive system tests for snapshot operations such as creation, deletion, and restoration. Additionally, the ability to start and stop individual validator nodes was integrated, allowing for improved control during testing scenarios.

Changes

Files Change Summary
tests/systemtests/cli.go Added RunCommandWithArgs method to CLIWrapper for executing CLI commands with arguments.
tests/systemtests/system.go Added StopSingleNode and StartSingleNode methods to SystemUnderTest for managing validator nodes.
tests/systemtests/snapshots_test.go Introduced system tests for snapshot management, covering creation, listing, dumping, deletion, and loading.
tests/systemtests/snapshots_v1_test.go Added system tests for snapshot management, including exporting, listing, dumping, deleting, and loading.
tests/systemtests/snapshots_v2_test.go Enhanced system tests for snapshot lifecycle and pruning operations within the blockchain.

Sequence Diagram(s)

sequenceDiagram
    participant CLIWrapper
    participant SystemUnderTest
    participant SnapshotManager

    CLIWrapper->>SystemUnderTest: RunCommandWithArgs(args)
    SystemUnderTest->>CLIWrapper: Execute command
    alt Command Success
        CLIWrapper-->>SystemUnderTest: Return output
        SystemUnderTest->>SnapshotManager: Manage snapshot operations
        SnapshotManager->>SnapshotManager: Create, List, Delete, Load snapshots
    else Command Failure
        CLIWrapper-->>SystemUnderTest: Return error output
    end
Loading

Assessment against linked issues

Objective Addressed Explanation
Add system-test for store's commands (#[21184])
Validate snapshot management functions (#[21184])
Improve CLI command execution for testing (#[21184])
Enhance control over individual nodes for testing (#[21184])

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@hieuvubk hieuvubk requested review from alpe and julienrbrt August 19, 2024 13:01
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 294b608 and 5b815ef.

Files selected for processing (3)
  • tests/systemtests/cli.go (1 hunks)
  • tests/systemtests/snapshots_test.go (1 hunks)
  • tests/systemtests/system.go (1 hunks)
Additional context used
Path-based instructions (3)
tests/systemtests/snapshots_test.go (3)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern tests/**/*: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

tests/systemtests/cli.go (2)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern tests/**/*: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"

tests/systemtests/system.go (2)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern tests/**/*: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"

Additional comments not posted (15)
tests/systemtests/snapshots_test.go (12)

16-26: Ensure chain is properly reset and started.

The chain is reset and started before performing snapshot operations, which is good practice to ensure a clean test environment.


34-37: Verify snapshot export operation.

The test correctly verifies the snapshot export operation by checking for the presence of a success message and the existence of the snapshot directory.


39-41: Check snapshot list operation.

The snapshot list operation is verified by checking for the expected height in the output.


43-46: Validate snapshot dump operation.

The test ensures that the snapshot dump operation is successful by checking for the existence of the output file.


48-50: Confirm snapshot delete operation.

The snapshot delete operation is validated by confirming the absence of the snapshot directory.


52-54: Verify snapshot load operation.

The snapshot load operation is verified by checking for the re-creation of the snapshot directory.


58-62: Ensure databases are removed before restore.

The test correctly removes the application and state sync databases before attempting to restore from a snapshot, ensuring a clean state.


64-66: Validate snapshot restore operation.

The snapshot restore operation is confirmed by checking the existence of the restored databases.


68-69: Restart node after snapshot operations.

The node is restarted after completing snapshot operations, which is necessary to ensure the system is back to a running state.


72-82: Ensure chain is properly reset and started for prune test.

The chain is reset and started before performing the prune operation, ensuring a clean test environment.


90-92: Verify prune operation.

The prune operation is validated by checking for a success message in the output.


94-95: Restart node after prune operation.

The node is restarted after the prune operation, ensuring the system is back to a running state.

tests/systemtests/cli.go (1)

172-180: Well-implemented method for running CLI commands.

The RunCommandWithArgs method is correctly implemented as a wrapper around the run method, providing a clear interface for executing CLI commands with arguments.

tests/systemtests/system.go (2)

334-351: Ensure error handling for stopping nodes.

The StopSingleNode method is well-implemented for stopping a single validator node. Ensure that the method is used in contexts where stopping the first node is appropriate, as it assumes the first PID corresponds to the node to be stopped.


353-362: Correct implementation for starting a single node.

The StartSingleNode method is correctly implemented, executing the command to start a node and ensuring no errors occur during the process.

@julienrbrt julienrbrt added backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release and removed backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release labels Aug 19, 2024
Copy link
Member

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

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

nice job!!

"github.com/stretchr/testify/require"
)

const nodeDir = "./testnet/node0/simdv2"
Copy link
Member

Choose a reason for hiding this comment

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

this wont work with v1, we should make sure it works with both

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5b815ef and 0758a91.

Files selected for processing (2)
  • tests/systemtests/snapshots_test.go (1 hunks)
  • tests/systemtests/system.go (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • tests/systemtests/snapshots_test.go
  • tests/systemtests/system.go

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 0758a91 and 59486ec.

Files selected for processing (1)
  • tests/systemtests/snapshots_test.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • tests/systemtests/snapshots_test.go

// RunCommandWithArgs use for run cli command, not tx
func (c CLIWrapper) RunCommandWithArgs(args ...string) string {
c.t.Helper()
execOutput, ok := c.run(args)
Copy link
Member

Choose a reason for hiding this comment

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

It always returns the execOutput here, shouldn't it return an error if not okay? Or is that expected that ok is ignored?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think should ignore it with the local command. execOutput already returns err if cmd failed, handler by run func.

}

// Kill the 1st node
return p.Kill()
Copy link
Member

Choose a reason for hiding this comment

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

Do we really want to kill it that way? This sends iirc a SIGKILL, we may want to stop the node more gracefully with SIGTERM

@@ -0,0 +1,121 @@
//go:build system_test
Copy link
Member

Choose a reason for hiding this comment

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

As the commands are really different between simapp and simapp v2, shall we not split the test in two tests?
The multiple if conditions will make it harder to maintain.

We can then just skip the tests when we run with COSMOS_BUILD_OPTIONS v2 and vice versa

Wdyt? cc @tac0turtle

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should we update the prefix, most diff is that v2 has store prefix and v1 has snapshots?

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 59486ec and c25487e.

Files selected for processing (2)
  • tests/systemtests/cli.go (1 hunks)
  • tests/systemtests/system.go (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • tests/systemtests/cli.go
  • tests/systemtests/system.go

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c25487e and 957446f.

Files selected for processing (1)
  • tests/systemtests/system.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • tests/systemtests/system.go

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 957446f and 92c8ad7.

Files selected for processing (2)
  • tests/systemtests/cli.go (1 hunks)
  • tests/systemtests/system.go (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • tests/systemtests/cli.go
  • tests/systemtests/system.go

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 92c8ad7 and 15c15e5.

Files selected for processing (4)
  • tests/systemtests/Makefile (1 hunks)
  • tests/systemtests/snapshots_v1_test.go (1 hunks)
  • tests/systemtests/snapshots_v2_test.go (1 hunks)
  • tests/systemtests/system.go (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • tests/systemtests/system.go
Additional context used
Path-based instructions (3)
tests/systemtests/Makefile (1)

Pattern tests/**/*: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"

tests/systemtests/snapshots_v1_test.go (3)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern tests/**/*: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

tests/systemtests/snapshots_v2_test.go (3)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern tests/**/*: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

Additional comments not posted (1)
tests/systemtests/Makefile (1)

8-8: LGTM!

The dynamic construction of the -tags option based on the presence of v2 in the COSMOS_BUILD_OPTIONS variable enhances the flexibility of the test command.

The code changes are approved.

Comment on lines 17 to 66
func TestSnapshots(t *testing.T) {
sut.ResetChain(t)
cli := NewCLIWrapper(t, sut, verbose)
// add genesis account with some tokens
account1Addr := cli.AddKey("account1")
sut.ModifyGenesisCLI(t,
[]string{"genesis", "add-genesis-account", account1Addr, "10000000stake"},
)

sut.StartChain(t)
nodeDir = filepath.Join(WorkDir, "testnet", "node0", "simd")

// Wait for chain produce some blocks
time.Sleep(time.Second * 10)
// Stop 1 node
err := sut.StopSingleNode()
require.NoError(t, err)
time.Sleep(time.Second * 5)

// export snapshot at height 5
res := cli.RunCommandWithArgs("snapshots", "export", "--height=5", fmt.Sprintf("--home=%s", nodeDir))
require.Contains(t, res, "Snapshot created at height 5")
require.DirExists(t, fmt.Sprintf("%s/data/snapshots/5/3", nodeDir))

// Check snapshots list
res = cli.RunCommandWithArgs("snapshots", "list", fmt.Sprintf("--home=%s", nodeDir))
require.Contains(t, res, "height: 5")

// Dump snapshot
res = cli.RunCommandWithArgs("snapshots", "dump", "5", "3", fmt.Sprintf("--home=%s", nodeDir), fmt.Sprintf("--output=%s/5-3.tar.gz", nodeDir))
// Check if output file exist
require.FileExists(t, fmt.Sprintf("%s/5-3.tar.gz", nodeDir))

// Delete snapshots
res = cli.RunCommandWithArgs("snapshots", "delete", "5", "3", fmt.Sprintf("--home=%s", nodeDir))
require.NoDirExists(t, fmt.Sprintf("%s/data/snapshots/5/3", nodeDir))

// Load snapshot from file
res = cli.RunCommandWithArgs("snapshots", "load", fmt.Sprintf("%s/5-3.tar.gz", nodeDir), fmt.Sprintf("--home=%s", nodeDir))
require.DirExists(t, fmt.Sprintf("%s/data/snapshots/5/3", nodeDir))

// Restore from snapshots

// Remove database
err = os.RemoveAll(fmt.Sprintf("%s/data/application.db", nodeDir))
require.NoError(t, err)

res = cli.RunCommandWithArgs("snapshots", "restore", "5", "3", fmt.Sprintf("--home=%s", nodeDir))
require.DirExists(t, fmt.Sprintf("%s/data/application.db", nodeDir))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using a more reliable synchronization mechanism.

The hardcoded sleep durations might make the tests flaky. Consider using a more reliable synchronization mechanism, such as waiting for a specific log message or event, to ensure the chain has produced the required blocks or the node has stopped.

Comment on lines 68 to 90
func TestPrune(t *testing.T) {
sut.ResetChain(t)
cli := NewCLIWrapper(t, sut, verbose)
// add genesis account with some tokens
account1Addr := cli.AddKey("account1")
sut.ModifyGenesisCLI(t,
[]string{"genesis", "add-genesis-account", account1Addr, "10000000stake"},
)

sut.StartChain(t)
nodeDir = filepath.Join(WorkDir, "testnet", "node0", "simd")

// Wait for chain produce some blocks
time.Sleep(time.Second * 10)
// Stop 1 node
err := sut.StopSingleNode()
require.NoError(t, err)
time.Sleep(time.Second)

// prune
res := cli.RunCommandWithArgs("prune", "everything", fmt.Sprintf("--home=%s", nodeDir))
require.Contains(t, res, "successfully pruned the application root multi stores")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using a more reliable synchronization mechanism.

The hardcoded sleep durations might make the tests flaky. Consider using a more reliable synchronization mechanism, such as waiting for a specific log message or event, to ensure the chain has produced the required blocks or the node has stopped.

Comment on lines 17 to 70
func TestSnapshots(t *testing.T) {
fmt.Println("TestSnapshots")
sut.ResetChain(t)
cli := NewCLIWrapper(t, sut, verbose)
// add genesis account with some tokens
account1Addr := cli.AddKey("account1")
sut.ModifyGenesisCLI(t,
[]string{"genesis", "add-genesis-account", account1Addr, "10000000stake"},
)

sut.StartChain(t)
nodeDir = filepath.Join(WorkDir, "testnet", "node0", "simdv2")

// Wait for chain produce some blocks
time.Sleep(time.Second * 10)
// Stop 1 node
err := sut.StopSingleNode()
require.NoError(t, err)
time.Sleep(time.Second * 5)

// export snapshot at height 5
res := cli.RunCommandWithArgs("store", "export", "--height=5", fmt.Sprintf("--home=%s", nodeDir))
require.Contains(t, res, "Snapshot created at height 5")
require.DirExists(t, fmt.Sprintf("%s/data/snapshots/5/3", nodeDir))

// Check snapshots list
res = cli.RunCommandWithArgs("store", "list", fmt.Sprintf("--home=%s", nodeDir))
require.Contains(t, res, "height: 5")

// Dump snapshot
res = cli.RunCommandWithArgs("store", "dump", "5", "3", fmt.Sprintf("--home=%s", nodeDir), fmt.Sprintf("--output=%s/5-3.tar.gz", nodeDir))
// Check if output file exist
require.FileExists(t, fmt.Sprintf("%s/5-3.tar.gz", nodeDir))

// Delete snapshots
res = cli.RunCommandWithArgs("store", "delete", "5", "3", fmt.Sprintf("--home=%s", nodeDir))
require.NoDirExists(t, fmt.Sprintf("%s/data/snapshots/5/3", nodeDir))

// Load snapshot from file
res = cli.RunCommandWithArgs("store", "load", fmt.Sprintf("%s/5-3.tar.gz", nodeDir), fmt.Sprintf("--home=%s", nodeDir))
require.DirExists(t, fmt.Sprintf("%s/data/snapshots/5/3", nodeDir))

// Restore from snapshots

// Remove database
err = os.RemoveAll(fmt.Sprintf("%s/data/application.db", nodeDir))
require.NoError(t, err)
err = os.RemoveAll(fmt.Sprintf("%s/data/ss", nodeDir))
require.NoError(t, err)

res = cli.RunCommandWithArgs("store", "restore", "5", "3", fmt.Sprintf("--home=%s", nodeDir))
require.DirExists(t, fmt.Sprintf("%s/data/application.db", nodeDir))
require.DirExists(t, fmt.Sprintf("%s/data/ss", nodeDir))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using a more reliable synchronization mechanism.

The hardcoded sleep durations might make the tests flaky. Consider using a more reliable synchronization mechanism, such as waiting for a specific log message or event, to ensure the chain has produced the required blocks or the node has stopped.

Comment on lines 72 to 94
func TestPrune(t *testing.T) {
sut.ResetChain(t)
cli := NewCLIWrapper(t, sut, verbose)
// add genesis account with some tokens
account1Addr := cli.AddKey("account1")
sut.ModifyGenesisCLI(t,
[]string{"genesis", "add-genesis-account", account1Addr, "10000000stake"},
)

sut.StartChain(t)
nodeDir = filepath.Join(WorkDir, "testnet", "node0", "simdv2")

// Wait for chain produce some blocks
time.Sleep(time.Second * 10)
// Stop 1 node
err := sut.StopSingleNode()
require.NoError(t, err)
time.Sleep(time.Second)

// prune
res := cli.RunCommandWithArgs("store", "prune", "--keep-recent=1", fmt.Sprintf("--home=%s", nodeDir))
require.Contains(t, res, "successfully pruned the application root multi stores")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using a more reliable synchronization mechanism.

The hardcoded sleep durations might make the tests flaky. Consider using a more reliable synchronization mechanism, such as waiting for a specific log message or event, to ensure the chain has produced the required blocks or the node has stopped.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 15c15e5 and 56d7c9d.

Files selected for processing (1)
  • tests/systemtests/system.go (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • tests/systemtests/system.go

julienrbrt
julienrbrt previously approved these changes Aug 27, 2024
Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

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

ACK

Copy link

@hieuvubk
Copy link
Contributor Author

systemtest v1 failing at TestChainUpgrade that weird

@alpe
Copy link
Contributor

alpe commented Sep 23, 2024

systemtest v1 failing at TestChainUpgrade that weird

This does not look related to your changes. I have triggered a re-run

@julienrbrt julienrbrt added this pull request to the merge queue Sep 23, 2024
Merged via the queue into main with commit ef8e2d4 Sep 23, 2024
72 of 73 checks passed
@julienrbrt julienrbrt deleted the hieu/systemtest/store branch September 23, 2024 14:53
@julienrbrt julienrbrt added the backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release label Oct 3, 2024
@julienrbrt
Copy link
Member

Adding backport label for system tests backport

mergify bot pushed a commit that referenced this pull request Oct 3, 2024
Co-authored-by: Alexander Peters <[email protected]>
(cherry picked from commit ef8e2d4)

# Conflicts:
#	store/snapshots/manager.go
#	store/v2/snapshots/manager.go
#	tests/systemtests/system.go
julienrbrt added a commit that referenced this pull request Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release C:Store
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Server/v2]: Add system-test for store's commands
5 participants