lytics / ios-sdk

MIT License
0 stars 0 forks source link

Fix CI Test Errors #102

Closed mgacy closed 1 year ago

mgacy commented 1 year ago

I've been seeing sporadic CI errors from tests timing out; this extends the expectation timeout to account for that.

This isn't the first time I've seen issues with timeouts for test expectations that depend on tasks that have a background priority when running on GitHub runners. I had hoped using XCTestCase.waitForExpectations(timeout:handler:) rather than .wait(for:timeout:) would address that but it seems not. I extended the timeout from 0.1 seconds to 0.5, which worked in the most recent run but that doesn't necessarily mean much.

One alternative would be to use swift-clocks but I'm not eager to add another dependency or to add availability checks to handle the fact that the Clock protocol is iOS 16+.

An alternative solution would be to make the task priority configurable (though not necessarily public) and to use a higher priority when executing LyticsTests.

I also updated .gitignore to make development easier.