Skip to content

Commit

Permalink
Merge pull request #872 from OneSignal/fix_flaky_waiting_of_threads_i…
Browse files Browse the repository at this point in the history
…n_tests

Add a 2nd run of runOSThreads if first didn't find
  • Loading branch information
jkasten2 authored Oct 22, 2019
2 parents 5099bcb + 5da1fdc commit bf091c8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ static void threadAndTaskWait() throws Exception {

boolean createdNewThread;
do {
createdNewThread = runOSThreads();
// We run a 2nd time if we did not find any threads to ensure we don't skip any
createdNewThread = runOSThreads() || runOSThreads();

boolean advancedRunnables = OneSignalPackagePrivateHelper.runAllNetworkRunnables();
advancedRunnables = OneSignalPackagePrivateHelper.runFocusRunnables() || advancedRunnables;
Expand Down

0 comments on commit bf091c8

Please sign in to comment.