From 94202646bc7e75bcaf777afc413bc685f398b4d4 Mon Sep 17 00:00:00 2001 From: Brandon Sneed Date: Wed, 17 Nov 2021 10:03:28 -0800 Subject: [PATCH 1/3] Call correct process method in Group. --- Sources/Segment/Events.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Segment/Events.swift b/Sources/Segment/Events.swift index 4d0cc27a..39d8e7e2 100644 --- a/Sources/Segment/Events.swift +++ b/Sources/Segment/Events.swift @@ -205,6 +205,6 @@ extension Analytics { exceptionFailure("Could not parse traits.") } } - process(event: event) + process(incomingEvent: event) } } From 5eced05517deb3b129e67ccd9f517f3cc6569eda Mon Sep 17 00:00:00 2001 From: Brandon Sneed Date: Wed, 17 Nov 2021 10:28:43 -0800 Subject: [PATCH 2/3] Fixed flush test --- Tests/Segment-Tests/Analytics_Tests.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/Segment-Tests/Analytics_Tests.swift b/Tests/Segment-Tests/Analytics_Tests.swift index ed4d093e..0c657dd8 100644 --- a/Tests/Segment-Tests/Analytics_Tests.swift +++ b/Tests/Segment-Tests/Analytics_Tests.swift @@ -319,8 +319,8 @@ final class Analytics_Tests: XCTestCase { analytics.track(name: "test") let newBatchCount = analytics.storage.eventFiles(includeUnfinished: true).count - // 1 new temp file, and 1 new finished file. - XCTAssertTrue(newBatchCount == currentBatchCount + 2) + // 1 new temp file + XCTAssertTrue(newBatchCount == currentBatchCount + 1) } func testVersion() { From 7f9c4d2131caf0848b394cc3a3a166f1d6ebe2dc Mon Sep 17 00:00:00 2001 From: Brandon Sneed Date: Wed, 17 Nov 2021 12:46:40 -0800 Subject: [PATCH 3/3] Get more test information --- Tests/Segment-Tests/Analytics_Tests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Segment-Tests/Analytics_Tests.swift b/Tests/Segment-Tests/Analytics_Tests.swift index 0c657dd8..1aa1df8a 100644 --- a/Tests/Segment-Tests/Analytics_Tests.swift +++ b/Tests/Segment-Tests/Analytics_Tests.swift @@ -320,7 +320,7 @@ final class Analytics_Tests: XCTestCase { let newBatchCount = analytics.storage.eventFiles(includeUnfinished: true).count // 1 new temp file - XCTAssertTrue(newBatchCount == currentBatchCount + 1) + XCTAssertTrue(newBatchCount == currentBatchCount + 1, "New Count (\(newBatchCount)) should be \(currentBatchCount) + 1") } func testVersion() {