diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 04a86ec6..4ef2e796 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -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 diff --git a/Tests/APNSwiftTests/APNSwiftRequestTests.swift b/Tests/APNSwiftTests/APNSwiftRequestTests.swift index bb985fa0..00e1db99 100644 --- a/Tests/APNSwiftTests/APNSwiftRequestTests.swift +++ b/Tests/APNSwiftTests/APNSwiftRequestTests.swift @@ -222,6 +222,7 @@ final class APNSwiftRequestTests: XCTestCase { XCTFail("response should not success") } } + XCTAssertNoThrow(XCTAssertTrue(try channel.finish().isClean)) } func testTokenProviderUpdate() { @@ -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 = [