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)
Description
Fixes failures in
UpstreamIntegrationTests.testSendEvent_withInvalidDatastreamID_receivesExpectedError()
due toupdateConfigurationWith(config:)
not being processed fast enough. The issue is since the integration tests perform a remote download of their configuration during setup, thesendEvent
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 invalidedge.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
andassertTypeMatch
to usepathOptions
, as the old APIs are deprecated.Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: