Skip to content

Commit

Permalink
Android: not quiting the tests thread looper to keep the app open aft…
Browse files Browse the repository at this point in the history
…er tests finish/fail (same behaviour as we have on iOS)
  • Loading branch information
rotemmiz committed Aug 9, 2017
1 parent c4479d3 commit fcf7689
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.support.annotation.NonNull;
import android.support.test.InstrumentationRegistry;
import android.util.Log;
Expand Down Expand Up @@ -77,7 +76,7 @@ public void run() {
stopping = true;
ReactNativeSupport.removeEspressoIdlingResources(reactNativeHostHolder);
wsClient.close();
Looper.myLooper().quit();
// Looper.myLooper().quit();
}
});
}
Expand Down

1 comment on commit fcf7689

@simonracz
Copy link
Contributor

@simonracz simonracz commented on fcf7689 Aug 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I would prefer to not call stop() then instead of changing the stop() function itself. Because there is no way now, to stop the test thread anymore.

  2. This part was originally designed in a way to support hybrid apps. So, the client can just add a detox test to the existing tests. (detox test is also no op by default) If detox test never stops, then the other tests don't get to run anymore. We are not a good citizen.

Of course there is still way to filter which tests to run, but that puts a bigger burden on the end user.

Please sign in to comment.