Skip to content

Commit

Permalink
[ml-model-downloader] Update unit test deprecated API (#13283)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulb777 authored Jul 15, 2024
1 parent f1b0f20 commit bcccff7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,18 @@
wait(for: [modelInfoRetrieveExpectation], timeout: 5)
}

/// Disabled since this test has been flaky in CI.
/// From https://github.com/firebase/firebase-ios-sdk/actions/runs/9944896811/job/27471928997
/// ModelDownloaderIntegrationTests.swift:190: XCTAssertGreaterThanOrEqual failed: ("-3106.0")
/// is less than ("0.0")
/// ModelDownloaderIntegrationTests.swift:190: XCTAssertGreaterThanOrEqual failed: ("-4902.0")
/// is less than ("0.0")
/// ModelDownloaderIntegrationTests.swift:204: error:
/// failed - Error: internalError(description: "Model download failed with HTTP error code:
/// 500")
///
/// Test to download model file - makes an actual network call.
func testModelDownload() throws {
func SKIPtestModelDownload() throws {
guard let testApp = FirebaseApp.app() else {
XCTFail("Default app was not configured.")
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@

guard let binaryData = try? modelOptions.serializedData(),
let jsonData = try? modelOptions.jsonUTF8Data(),
let binaryEvent = try? ModelOptions(serializedData: binaryData),
let binaryEvent = try? ModelOptions(serializedBytes: binaryData),
let jsonEvent = try? ModelOptions(jsonUTF8Data: jsonData) else {
XCTFail("Encoding error.")
return
Expand Down

0 comments on commit bcccff7

Please sign in to comment.