Skip to content

Commit

Permalink
fix: set fastlane tests to run one at a time instead of concurrently
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushalkapasi committed Apr 10, 2024
1 parent 214584f commit dfb60ed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion DevCycle/Networking/DevCycleService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ class DevCycleService: DevCycleServiceProtocol {
}

func publishEvents(events: [DevCycleEvent], user: DevCycleUser, completion: @escaping PublishEventsCompletionHandler) {
print("in real publishEvents")
var eventsRequest = createEventsRequest()
let userEncoder = JSONEncoder()
userEncoder.dateEncodingStrategy = .iso8601
Expand Down
5 changes: 2 additions & 3 deletions DevCycleTests/Networking/DevCycleServiceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class DevCycleServiceTests: XCTestCase {
eventQueue.queue(event)
}
eventQueue.flush(service: service, user: user, callback: nil)
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
XCTAssertEqual(eventQueue.events.count, 0)
expectation.fulfill()
}
Expand All @@ -109,7 +109,7 @@ class DevCycleServiceTests: XCTestCase {
eventQueue.queue(event)
}
eventQueue.flush(service: service, user: user, callback: nil)
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
XCTAssertEqual(eventQueue.events.count, 0)
expectation.fulfill()
}
Expand Down Expand Up @@ -164,7 +164,6 @@ extension DevCycleServiceTests {
let testMaxBatchSize = 100

func publishEvents(events: [DevCycleEvent], user: DevCycleUser, completion: @escaping PublishEventsCompletionHandler) {
print("in mocked DevCycleServiceTests publishEvents")
publishEventsCalled = true

let url = URL(string: "http://test.com/v1/events")!
Expand Down
4 changes: 4 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ platform :ios do
buildlog_path: "./fastlane/fastlane-buildlog",
scheme: "DevCycle",
workspace: "DevCycle.xcworkspace",
disable_concurrent_testing: true,
result_bundle: true
)
end
Expand All @@ -64,6 +65,7 @@ platform :tvos do
buildlog_path: "./fastlane/fastlane-buildlog",
scheme: "DevCycle",
workspace: "DevCycle.xcworkspace",
disable_concurrent_testing: true,
result_bundle: true
)
end
Expand All @@ -76,6 +78,7 @@ platform :watchos do
derived_data_path: "~/Library/Developer/Xcode/DerivedData",
buildlog_path: "./fastlane/fastlane-buildlog",
scheme: "DevCycle",
disable_concurrent_testing: true,
result_bundle: true
)
end
Expand Down Expand Up @@ -108,6 +111,7 @@ platform :mac do
scan(
scheme: "DevCycle",
workspace: "DevCycle.xcworkspace",
disable_concurrent_testing: true,
destination: "platform=macOS"
)

Expand Down

0 comments on commit dfb60ed

Please sign in to comment.