Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use APIs available on older macOS in tests #25

Merged

Conversation

simonjbeaumont
Copy link
Collaborator

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.

@simonjbeaumont simonjbeaumont marked this pull request as ready for review November 17, 2023 17:44
@simonjbeaumont simonjbeaumont enabled auto-merge (squash) November 17, 2023 17:44
@simonjbeaumont simonjbeaumont merged commit 8464a53 into apple:main Nov 17, 2023
5 checks passed
@simonjbeaumont simonjbeaumont added the semver/patch No public API change. label Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants