Skip to content

Commit

Permalink
fix flaky test (#3833)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1205237866452338/1209195419020322/f

**Description**: Fix Flaky integration test. the etag could be nil at
the beginning
  • Loading branch information
SabrinaTardio authored Jan 20, 2025
1 parent 2e438bb commit db76a93
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ final class ConfigurationManagerIntegrationTests: XCTestCase {
await configManager.fetchAndUpdateTrackerBlockingDependencies()

// THEN
var newEtag = ContentBlocking.shared.trackerDataManager.fetchedData?.etag
let newEtag = ContentBlocking.shared.trackerDataManager.fetchedData?.etag
XCTAssertNotEqual(etag, newEtag)
XCTAssertEqual(newEtag, "\"2ce60c57c3d384f986ccbe2c422aac44\"")

// RESET
customURLProvider.customPrivacyConfigurationURL = URL.privacyConfig
Configuration.setURLProvider(customURLProvider)
await configManager.fetchAndUpdateTrackerBlockingDependencies()
newEtag = ContentBlocking.shared.trackerDataManager.fetchedData?.etag
XCTAssertEqual(etag, newEtag)
let resetEtag = ContentBlocking.shared.trackerDataManager.fetchedData?.etag
XCTAssertNotEqual(newEtag, resetEtag)
}

}

0 comments on commit db76a93

Please sign in to comment.