Skip to content

Commit 4a70fda

Browse files
committed
import FoundationNetworking
1 parent 32663fd commit 4a70fda

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,13 @@ jobs:
136136
runs-on: ubuntu-latest
137137
steps:
138138
- uses: actions/checkout@v5
139+
- name: "Cache Swift Package"
140+
uses: actions/cache@v4
141+
with:
142+
path: .build
143+
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
144+
restore-keys: |
145+
${{ runner.os }}-spm-
139146
- name: "Build Swift Package"
140147
run: swift build
141148
- name: "Test Swift Package"

Tests/RealtimeTests/RealtimeChannelTests.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ import XCTestDynamicOverlay
1212

1313
@testable import Realtime
1414

15+
#if canImport(FoundationNetworking)
16+
import FoundationNetworking
17+
#endif
18+
1519
final class RealtimeChannelTests: XCTestCase {
1620
let sut = RealtimeChannelV2(
1721
topic: "topic",
@@ -439,7 +443,9 @@ final class RealtimeChannelTests: XCTestCase {
439443
XCTFail("Expected httpSend to throw an error on 503 status")
440444
} catch {
441445
// Should fall back to localized status text
442-
XCTAssertTrue(error.localizedDescription.contains("503") || error.localizedDescription.contains("unavailable"))
446+
XCTAssertTrue(
447+
error.localizedDescription.contains("503")
448+
|| error.localizedDescription.contains("unavailable"))
443449
}
444450
}
445451
}

0 commit comments

Comments
 (0)