Skip to content

Commit

Permalink
Updated test to leverage the fulfillment method to wait for expectati…
Browse files Browse the repository at this point in the history
…ons (#20)

* Updated test to leverage the fulfillment method to wait for expectations

* Updated actions
  • Loading branch information
Henryforce authored Jul 18, 2024
1 parent f8dd71b commit e39c6bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
env:
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer

jobs:
build:

runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build
run: swift build -v
- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion Tests/AsyncTimeSequencesTests/AsyncSchedulerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ final class AsyncSchedulerTests: XCTestCase {
secondExpectation.fulfill()
}

wait(for: [firstExpectation, secondExpectation], timeout: 1.0)
await fulfillment(of: [firstExpectation, secondExpectation], timeout: 1.0)

// The cancelled task is scheduled after 30 ms, hence waiting for 50ms
try? await Task.sleep(milliseconds: 50)
Expand Down

0 comments on commit e39c6bc

Please sign in to comment.