pokt-network / pocket-core

Official implementation of the Pocket Network Protocol
http://www.pokt.network
MIT License
209 stars 103 forks source link

Explicitly set TestMode=0 in TestValidatorStateChange_OutputAddressEdit #1543

Closed msmania closed 1 year ago

msmania commented 1 year ago

We cannot trust the current state as it may have been modified by previous tests and not reverted to the original value.

reviewpad[bot] commented 1 year ago

AI-Generated Summary: This pull request includes a patch that explicitly sets TestMode=0 in the TestValidatorStateChange_OutputAddressEdit function. This ensures that the current state is not affected by previous tests, providing a more reliable test environment. The changes are made in the valStateChanges_test.go file with 3 lines added.

Olshansk commented 1 year ago

@msmania Seems like it's still failing: https://app.circleci.com/pipelines/github/pokt-network/pocket-core/2811/workflows/fdf09d63-cf8f-45a2-bb3f-4a1fc54d0a00/jobs/5260/parallel-runs/0/steps/0-102

msmania commented 1 year ago

@msmania Seems like it's still failing: https://app.circleci.com/pipelines/github/pokt-network/pocket-core/2811/workflows/fdf09d63-cf8f-45a2-bb3f-4a1fc54d0a00/jobs/5260/parallel-runs/0/steps/0-102

Maybe adding a single test broke the testing order..? Probably the root cause is the same. Let's fix them all.

reviewpad[bot] commented 1 year ago

AI-Generated Summary: This pull request modifies two test files, reward_test.go and valStateChanges_test.go within the nodes/keeper directory. The changes mainly include the addition of test clean-up code that restores the global parameters to their original values after they have been modified by the tests. These clean-up functions are necessary to prevent unexpected test behavior or conflicts between different tests. A total of 49 new lines were added and 3 existing lines were modified.

msmania commented 1 year ago

All passed!