Skip to content

Commit

Permalink
testing ci output
Browse files Browse the repository at this point in the history
  • Loading branch information
bsneed committed Apr 17, 2024
1 parent 3fbf3a8 commit 83e2288
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
4 changes: 4 additions & 0 deletions Sources/Segment/Plugins/SegmentDestination.swift
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public class SegmentDestination: DestinationPlugin, Subscriber, FlushCompletion

// enter for the high level flush, allow us time to run through any existing files..
group.enter()
print("flush entering group")

eventCount = 0
cleanupUploads()
Expand All @@ -156,6 +157,7 @@ public class SegmentDestination: DestinationPlugin, Subscriber, FlushCompletion
}

// leave for the high level flush
print("flush leaving group")
group.leave()
}
}
Expand All @@ -171,6 +173,7 @@ extension SegmentDestination {
for url in files {
// enter for this url we're going to kick off
group.enter()
print("flushFiles entered group \(url)")
analytics.log(message: "Processing Batch:\n\(url.lastPathComponent)")

// set up the task
Expand Down Expand Up @@ -198,6 +201,7 @@ extension SegmentDestination {
// call the completion
completion(self)
// leave for the url we kicked off.
print("flushFiles leaving group \(url)")
group.leave()
}

Expand Down
11 changes: 1 addition & 10 deletions Tests/Segment-Tests/Analytics_Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,6 @@ final class Analytics_Tests: XCTestCase {
let shared2 = Analytics.shared()
XCTAssertFalse(alive2 === shared2)
XCTAssertTrue(shared2 === shared)

}

func testAsyncOperatingMode() throws {
Expand All @@ -758,10 +757,6 @@ final class Analytics_Tests: XCTestCase {
// set the httpclient to use our blocker session
let segment = analytics.find(pluginType: SegmentDestination.self)
let configuration = URLSessionConfiguration.ephemeral
configuration.allowsCellularAccess = true
configuration.timeoutIntervalForResource = 30
configuration.timeoutIntervalForRequest = 60
configuration.httpMaximumConnectionsPerHost = 2
configuration.protocolClasses = [BlockNetworkCalls.self]
configuration.httpAdditionalHeaders = ["Content-Type": "application/json; charset=utf-8",
"Authorization": "Basic test",
Expand All @@ -783,7 +778,7 @@ final class Analytics_Tests: XCTestCase {
expectation.fulfill()
}

wait(for: [expectation], timeout: 5)
wait(for: [expectation], timeout: 1)

XCTAssertNil(analytics.pendingUploads)
}
Expand All @@ -798,10 +793,6 @@ final class Analytics_Tests: XCTestCase {
// set the httpclient to use our blocker session
let segment = analytics.find(pluginType: SegmentDestination.self)
let configuration = URLSessionConfiguration.ephemeral
configuration.allowsCellularAccess = true
configuration.timeoutIntervalForResource = 30
configuration.timeoutIntervalForRequest = 60
configuration.httpMaximumConnectionsPerHost = 2
configuration.protocolClasses = [BlockNetworkCalls.self]
configuration.httpAdditionalHeaders = ["Content-Type": "application/json; charset=utf-8",
"Authorization": "Basic test",
Expand Down

0 comments on commit 83e2288

Please sign in to comment.