Skip to content

Commit 32e6e4c

Browse files
bsneedBrandon Sneed
andauthored
Remove unused taskID. (#119)
* Remove unused taskID. * Remove use of taskID * Restructure test failure expectation Co-authored-by: Brandon Sneed <[email protected]>
1 parent 0038c32 commit 32e6e4c

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

Sources/Segment/Plugins/Platforms/iOS/iOSLifecycleMonitor.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ extension SegmentDestination.UploadTaskInfo {
195195
task.cancel()
196196
application.endBackgroundTask(taskIdentifier)
197197
}
198-
self.taskID = taskIdentifier.rawValue
199198

200199
self.cleanup = {
201200
application.endBackgroundTask(taskIdentifier)

Sources/Segment/Plugins/SegmentDestination.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public class SegmentDestination: DestinationPlugin {
3636
let task: URLSessionDataTask
3737
// set/used via an extension in iOSLifecycleMonitor.swift
3838
typealias CleanupClosure = () -> Void
39-
var taskID: Int = 0
4039
var cleanup: CleanupClosure? = nil
4140
}
4241

Tests/Segment-Tests/Analytics_Tests.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ final class Analytics_Tests: XCTestCase {
100100

101101
analytics.track(name: "testDestinationEnabled")
102102

103-
XCTExpectFailure()
104-
wait(for: [expectation], timeout: 1.0)
103+
XCTExpectFailure {
104+
wait(for: [expectation], timeout: 1.0)
105+
}
105106
}
106107
#endif
107108

0 commit comments

Comments
 (0)