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

Wait for Configuration update in Integration tests #462

Merged
merged 1 commit into from
May 1, 2024

Conversation

kevinlind
Copy link
Collaborator

Description

Fixes failures in UpstreamIntegrationTests.testSendEvent_withInvalidDatastreamID_receivesExpectedError() due to updateConfigurationWith(config:) not being processed fast enough. The issue is since the integration tests perform a remote download of their configuration during setup, the sendEvent call in the test case gets dispatched before the initial Configuration state is set. In the failing test case, a second Configuration update is made to set an invalid edge.configId, however it is processed after the experience event is queued. Recent updates now set the configuration with the queued experience event, instead of resolving the configuration at the time the event is processed.
The fix is to wait for the Configuration response content event during setup before starting each test case.

Updates calls to assertExactMatch and assertTypeMatch to use pathOptions, as the old APIs are deprecated.

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@kevinlind kevinlind requested a review from timkimadobe May 1, 2024 23:04
Copy link
Contributor

@timkimadobe timkimadobe left a comment

Choose a reason for hiding this comment

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

Thanks for the test case updates Kevin! Changes look good

@kevinlind kevinlind merged commit 0f9dbdc into adobe:dev May 1, 2024
6 checks passed
@kevinlind kevinlind deleted the fix-integration-tests branch May 1, 2024 23:41
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.

None yet

2 participants