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

feat: add simulator test wiring #12

Merged
merged 5 commits into from
Jun 26, 2024

Conversation

fmorency
Copy link
Contributor

@fmorency fmorency commented Jun 19, 2024

Fixes #11

Summaryt

This PR fixes the existing simulator cases and adds simulator test wiring.

All tests pass except TestAppImportExport like in strangelove-ventures/poa#186

Not sure why.

Run

go test -timeout 3000s -run ^TestFullAppSimulation$ github.com/strangelove-ventures/tokenfactory/app -v -Enabled -Commit=true

@fmorency
Copy link
Contributor Author

@Reecepbcups I can't assign you as a reviewer. Commenting for visibility.

@Reecepbcups Reecepbcups self-requested a review June 20, 2024 13:19
app/sim_test.go Outdated Show resolved Hide resolved
app/sim_test.go Outdated Show resolved Hide resolved
Comment on lines +95 to +96
err = simtestutil.CheckExportSimulation(app, config, simParams)
require.NoError(t, err)
Copy link
Member

@Reecepbcups Reecepbcups Jun 26, 2024

Choose a reason for hiding this comment

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

I am getting a invalid height: 2; expected: 1 error on tokenfactory/app/sim_test.go:97 for all the test

Starting the simulation from time Sun May 21 15:21:12 UTC 2248 (unixtime 8785034472)
Simulating... block 1/500, operation 300/332.     sim_test.go:97: 
                Error Trace:    /home/reece/Desktop/Programming/Go/tokenfactory/app/sim_test.go:97
                Error:          Received unexpected error:
                                invalid height: 2; expected: 1

go test -timeout 3000s -run ^TestFullAppSimulation$ github.com/strangelove-ventures/tokenfactory/app -v -Enabled

Maybe something with config.InitialBlockHeight ? or if simErr needs to just be checked selectively if some simParams or app value is set

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a known CosmosSDK issue. See cosmos/cosmos-sdk#20592.

Try running with -Commit=true

Copy link
Member

Choose a reason for hiding this comment

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

cool ty! updated the summary. Leaving this as unresolved for future context

@Reecepbcups Reecepbcups merged commit 7533499 into strangelove-ventures:main Jun 26, 2024
5 checks passed
@Reecepbcups
Copy link
Member

Thanks!

@fmorency fmorency deleted the simulator branch June 27, 2024 13:20
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.

feat: simulation support
2 participants