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

Enabling additional tests to run in parallel #6766

Merged
merged 227 commits into from
Jul 10, 2024

Conversation

chatton
Copy link
Contributor

@chatton chatton commented Jul 4, 2024

Description

depends on #6721

This PR enables the following tests to run as a full test suite in parallel

  • TestAuthzTransferTestSuite
  • TestTransferTestSuiteSendReceive
  • TestTransferTestSuiteSendEnabled
  • TestTransferLocalhostTestSuite
  • TestConnectionTestSuite
  • TestInterchainAccountsGovTestSuite
  • TestIncentivizedTransferTestSuite
  • TestTransferForwardingTestSuite

ref: #6764


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against the correct branch (see CONTRIBUTING.md).
  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/).
  • Added relevant godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog)
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

chatton and others added 30 commits April 8, 2024 13:00
* chore: adding proto files for ics20-v2

* chore: add newline
* add CurrentVersion, EscrowVersion, update tests

* update hardcoded transfer channel version from interchaintest
---------

Co-authored-by: Charly <charly@interchain.berlin>
…shalling/conversion (#6226)

* chore: adding proto files for ics20-v2

* chore: add newline

* chore: modify MsgTransfer to accept coins instead of coin

* chore: reverted unintentional comment changes

* chore: reverted unintentional comment changes

* chore: adding test for conversion fn

* chore: fix e2e linter

* chore: adding docs

* chore: addressing PR feedback

* chore: remove duplicate import

* chore: addressing PR feedback

* chore: moved extration logic into internal package

* chore: commented out failing test

* chore: adding link to issue

* chore: remove duplicate import

* chore: fix linting errors

* FungibleTokenPacketData interface methods + tests

* linter

* wip: token validation

* update trace identifier validation in Token + tests

* rm Printf

* update with pr review

* add CurrentVersion, EscrowVersion, update tests

* pr review

* fix e2e tests

* pr review

* update e2e test version

* linter

* update hardcoded transfer channel version from interchaintest

* update hardcoded transfer channel version from interchaintest

* wip packet unmarshaller

* wip

* wip testing

* update test

* linter

* rm unnecessary version changes

* rm unnecessary artifacts

* update callbacks test

* update comment

* pr review

* rename getMultiDenomFungibleTokenPacketData to unmarshalPacketDataBytesToICS20V2

---------

Co-authored-by: chatton <github.qpeyb@simplelogin.fr>
Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
…allbacks (#6175)

* add SupportedVersions array for different ics20 versions, add version checking on channel handshake application callbacks

* add tests

* update pr review

* pr review

* last few pr review nits

* linter

* add version counter proposing

* fix missing app versino

* update code + tests to return our proposed version if counterparty version is invalid

* remove if statement

* address review comments: return ics20-2 if counterparty version is not supported

---------

Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
…transfers (#6252)

* add transfer authz code + tests

* linter

* address review comments

---------

Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
…ks (#6189)

* chore: adding proto files for ics20-v2

* chore: add newline

* chore: modify MsgTransfer to accept coins instead of coin

* chore: reverted unintentional comment changes

* chore: reverted unintentional comment changes

* chore: adding test for conversion fn

* chore: fix e2e linter

* chore: adding docs

* chore: addressing PR feedback

* chore: remove duplicate import

* chore: addressing PR feedback

* chore: moved extration logic into internal package

* chore: commented out failing test

* chore: adding link to issue

* chore: remove duplicate import

* chore: fix linting errors

* FungibleTokenPacketData interface methods + tests

* linter

* wip: token validation

* update trace identifier validation in Token + tests

* rm Printf

* update with pr review

* pr review

* linter

* rm unused function: linter

* wip pr feedback

* fix test

* pr review

* lintttttt

* wip: backwards compatibility for transfer rpc

* implement changes for ics20-v2 packet data for onRecvPacket, onAcknowledgePacket and onTimeoutPacket

* fix callbacks tests

* lint

---------

Co-authored-by: chatton <github.qpeyb@simplelogin.fr>
Co-authored-by: Charly <charly@interchain.berlin>
DockerClient *dockerclient.Client
network string
chains []ibc.Chain
relayerWallets relayer.Map
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 name is clearer I think now that there is a pool of relayers which is actually relayers, this is specifically wallets to use in tests.

Base automatically changed from cian/enable-parallel-tests to main July 9, 2024 08:44
@chatton chatton changed the title [WIP] Enabling additional tests to run in parallel Enabling additional tests to run in parallel Jul 9, 2024
Comment on lines +345 to +346
rlyAName := fmt.Sprintf("%s-%s", ChainARelayerName, testName)
rlyBName := fmt.Sprintf("%s-%s", ChainBRelayerName, testName)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is a relayer wallet per chain per test

@@ -64,7 +64,7 @@ func (s *E2ETestSuite) BroadcastMessages(ctx context.Context, chain ibc.Chain, u
broadcastFunc := func() (sdk.TxResponse, error) {
return cosmos.BroadcastTx(ctx, broadcaster, user, msgs...)
}
if s.relayers.ContainsRelayer(s.T().Name(), user) {
if s.relayerWallets.ContainsRelayer(s.T().Name(), user) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

just noticing that s.T().Name() is no longer the correct key for this, changing this will make the diff super ugly so I might do this in a follow up.

@chatton chatton added the priority PRs that need prompt reviews label Jul 9, 2024
@@ -53,6 +53,7 @@ func (suite *AuthzTransferTestSuite) TestAuthz_MsgTransfer_Succeeds() {
ctx := context.TODO()

testName := t.Name()
t.Parallel()
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a rule of thumb when to add this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ideally we can just add this any time there are tests that do not make chain-wide modifications such as param changes / chain halts / config modifications etc.

In some cases it works out the box (like with authz and forwarding E2Es) and some will take some re-working or tweaking (looking at ICA )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will make sure to add this to the updated README for E2Es once this block of work is done!

Copy link

sonarcloud bot commented Jul 10, 2024

Copy link
Contributor

@DimitrisJim DimitrisJim left a comment

Choose a reason for hiding this comment

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

🥳

@chatton chatton added this pull request to the merge queue Jul 10, 2024
Merged via the queue into main with commit 9ff8ddb Jul 10, 2024
125 of 131 checks passed
@chatton chatton deleted the cian/enable-per-suite-tests-for-other-tests branch July 10, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority PRs that need prompt reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.