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: fix key assignment in testing #2344

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

sainoe
Copy link
Contributor

@sainoe sainoe commented Oct 10, 2024

Description

During the testing setup, some consumer keys are assigned to the first consumer chain. This is achieved by calling the preProposalKeyAssignment function with the FirstConsumerId global variable. However, this variable is only initiated later in AddConsumer. As a result, the keys are mapped to an empty string "" as the consumerId, causing tests that rely on these consumer keys, e.g. TestRelayAndApplyDowntimePacket, to fail when run individually.

This PR refactors the testing setup to ensure preProposalKeyAssignment is called after FirstConsumerId is initialized.

Closes: #XXXX


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
  • Targeted the correct branch (see PR Targeting)
  • Provided a link to the relevant issue or specification
  • Reviewed "Files changed" and left comments if necessary
  • 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.

I have...

  • Confirmed the correct type prefix in the PR title
  • Confirmed all author checklist items have been addressed
  • Confirmed that this PR does not change production code

@sainoe sainoe requested a review from a team as a code owner October 10, 2024 15:09
@github-actions github-actions bot added the C:Testing Assigned automatically by the PR labeler label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:Testing Assigned automatically by the PR labeler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant