Skip to content

Wait for Configuration update in Integration tests#462

Merged
kevinlind merged 1 commit intoadobe:devfrom
kevinlind:fix-integration-tests
May 1, 2024
Merged

Wait for Configuration update in Integration tests#462
kevinlind merged 1 commit intoadobe:devfrom
kevinlind:fix-integration-tests

Conversation

@kevinlind
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
@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.

2 participants