Commit 8464a53
authored
Use APIs available on older macOS in tests (#25)
### Motivation
The tests fail to compile on anything older than macOS 13, because they
use a number of APIs only available in macOS 13+:
- `Duration`
- `Task.sleep(for:)`
- `DispatchQueue.asyncAndWait` (closure variant)
### Modifications
Use the following APIs instead:
- `NIO.TimeInterval` (we have NIO dependency in tests already).
- `Task.sleep(nanoseconds:)`
- `DispatchQueue.asyncAndWait(execute:)`
### Result
Tests can be built on older platforms.1 parent 686df72 commit 8464a53
File tree
2 files changed
+8
-6
lines changed- Tests/OpenAPIURLSessionTests/URLSessionBidirectionalStreamingTests
2 files changed
+8
-6
lines changedTests/OpenAPIURLSessionTests/URLSessionBidirectionalStreamingTests/HTTPBodyOutputStreamTests.swift
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
| 308 | + | |
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| |||
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
390 | | - | |
| 390 | + | |
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| |||
0 commit comments