Skip to content

Commit

Permalink
Try to fix fps test
Browse files Browse the repository at this point in the history
  • Loading branch information
Chumva committed May 14, 2024
1 parent f2476a5 commit 90fd50b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

import android.os.Handler;
import android.os.Looper;
import android.util.Log;

import androidx.annotation.NonNull;
import androidx.lifecycle.Lifecycle.State;
import androidx.test.espresso.Espresso;
import androidx.test.espresso.IdlingPolicies;
import androidx.test.ext.junit.rules.ActivityScenarioRule;
Expand Down Expand Up @@ -84,7 +84,7 @@ public void test() throws Throwable {
gpxFile.path = testItem.getFile().getPath();
app.getSelectedGpxHelper().selectGpxFile(gpxFile, params);

mActivityScenarioRule.getScenario().onActivity(activity -> {
mActivityScenarioRule.getScenario().moveToState(State.RESUMED).onActivity(activity -> {
mapView = activity.getMapView();
MapRendererView rendererView = mapView.getMapRenderer();
if (rendererView != null) {
Expand Down Expand Up @@ -128,7 +128,7 @@ public ObserveDistToFinishIdlingResource(@NonNull OsmandApplication app) {
MapRendererView rendererView = mapView.getMapRenderer();
if (rendererView != null) {
int renderedFrames = rendererView.getFrameId() - startFrameId;
if(renderedFrames < 50) {
if (renderedFrames < 25) {
throw new AssertionError("Map rendering to slow. rendered " + renderedFrames + " frames");
}
} else {
Expand Down

0 comments on commit 90fd50b

Please sign in to comment.