Skip to content

Commit

Permalink
fix address leaks in tests. (#61)
Browse files Browse the repository at this point in the history
* fix leaks in tests.

* Disable leak detection for linux
  • Loading branch information
kylebrowning authored Nov 20, 2019
1 parent 9b79f5b commit 1746cd2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
steps:
- uses: actions/checkout@master
- run: swift test --sanitize=thread
# address:
# container:
# image: vapor/swift:5.1-bionic
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - run: swift test --sanitize=address
address:
container:
image: vapor/swift:5.1-bionic
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: ASAN_OPTIONS=detect_leaks=0 swift test --sanitize=address
2 changes: 2 additions & 0 deletions Tests/APNSwiftTests/APNSwiftRequestTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ final class APNSwiftRequestTests: XCTestCase {
XCTFail("response should not success")
}
}
XCTAssertNoThrow(XCTAssertTrue(try channel.finish().isClean))
}

func testTokenProviderUpdate() {
Expand Down Expand Up @@ -261,6 +262,7 @@ final class APNSwiftRequestTests: XCTestCase {
loop.advanceTime(by: .minutes(55))
// Should have changed
XCTAssertFalse(newCachedToken == bearerToken.currentBearerToken)
bearerToken.cancel()

}
static var allTests = [
Expand Down

0 comments on commit 1746cd2

Please sign in to comment.