Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
I considered switching the test to instead use sandbox, but discovered
that fallback hosts for realtime connections with custom environments
are not working; see #2009.

Resolves #2008.
  • Loading branch information
lawrence-forooghian committed Jan 9, 2025
1 parent 6d0191f commit 0a3caf4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Test/Tests/RealtimeClientConnectionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4132,7 +4132,8 @@ class RealtimeClientConnectionTests: XCTestCase {
guard let error = stateChange.reason else {
fail("Error is nil"); done(); return
}
XCTAssertTrue(error.code == ARTErrorCode.invalidCredential.rawValue)
// This is because, at time of writing, the production environment is handling connections using both frontend (which returns invalidCredential) and frontdoor (which returns invalidCredentials). So we need to handle both cases at least for now (unlike other tests, which use sandbox which is 100% using frontdoor).
XCTAssertTrue(error.code == ARTErrorCode.invalidCredential.rawValue || error.code == ARTErrorCode.invalidCredentials.rawValue)
done()
}
}
Expand Down

0 comments on commit 0a3caf4

Please sign in to comment.