I found that there was an MPBackgroundController unit test called testPreviousForegroundTime that was failing only on Github due to the way it was implemented. While investigating that, I found that I had the isLaunch boolean backwards, and it should also have its own unit test.
I also noticed that some tests were disabled for tvOS when there's no reason for that as the behavior should be the same, so I enabled them.
I also fixed how some of the other tests were implemented regarding messageQueue threading.
Testing Plan
Confirmed via breakpoints when running the previousForgroundTime test that the assertions are hitting correctly now
Tested isLaunch behavior in a test app locally and new unit test added
Confirmed all tests run on tvOS as well
Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)
Summary
I found that there was an MPBackgroundController unit test called testPreviousForegroundTime that was failing only on Github due to the way it was implemented. While investigating that, I found that I had the isLaunch boolean backwards, and it should also have its own unit test.
I also noticed that some tests were disabled for tvOS when there's no reason for that as the behavior should be the same, so I enabled them.
I also fixed how some of the other tests were implemented regarding messageQueue threading.
Testing Plan
Confirmed all tests run on tvOS as well
Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)