Skip to content

Commit c3d1f8b

Browse files
JIghtusegithub-actions[bot]
authored andcommitted
[MAPSNAT-3797] Disable offline vt compositing for the test
GitOrigin-RevId: 76f9ba71a80fdb031c5a62c7050a50a2588a905c
1 parent 0dcde24 commit c3d1f8b

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

Tests/MapboxMapsTests/Integration Tests/OfflineManagerIntegrationTests.swift

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,24 @@ final class OfflineManagerIntegrationTestCase: IntegrationTestCase {
177177
wait(for: [allTileRegionsCompletionBlockInvoked], timeout: 120.0)
178178
}
179179

180+
private func disableOfflineCompositing() {
181+
let ss = SettingsServiceFactory.getInstance(storageType: SettingsServiceStorageType.nonPersistent)
182+
let setResult = ss.set(key: "com.mapbox.maps.experimental.offline_vt_compositing", value: false)
183+
switch setResult {
184+
case .success:
185+
print("Turned off vt compositing")
186+
case .failure(let error):
187+
XCTFail("Error turning off vt compositing: \(String(describing: error.errorDescription))")
188+
}
189+
}
190+
180191
func testMapCanBeLoadediWithoutNetworkConnectivity() throws {
181-
throw XCTSkip("Needs to be investigated and fixed after MAPSNAT-3767")
192+
// When asked for higher-level zoom tiles, and no tile with this specific zoom present in tile store,
193+
// offline compositing overscales lower-zoom tiles and request higher-level tiles from the network,
194+
// which leads to a test failure.
195+
// In some future we won't have composite sources in styles which use compositing.
196+
// So here we will mimick this future behavior for now.
197+
disableOfflineCompositing()
182198

183199
try guardForMetalDevice()
184200

0 commit comments

Comments
 (0)