adobe / aepsdk-edge-ios

Adobe Experience Platform Edge Network mobile extension in Swift
Apache License 2.0
13 stars 24 forks source link

Wait for Configuration update in Integration tests #462

Closed kevinlind closed 5 months ago

kevinlind commented 5 months ago

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

Checklist: