Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdf453aa authored by Diego Perez's avatar Diego Perez
Browse files

Fix broken perf tests

Do not dispose Bridge on tearDown. The concept of disposing the Bridge
only made sense when we were loading it dynamically. Some classes have
static initializers that will fail after the dispose (like Typeface).

Test: N/A
Change-Id: I9c934432232bda02a4d26425587096fb6dc957b0
(cherry picked from commit f1532e36)
parent ef3a28cb
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -311,7 +311,6 @@ public class RenderTestBase {
        sFrameworkRepo = null;
        sProjectResources = null;
        sLogger = null;
        sBridge.dispose();
        sBridge = null;

        TestUtils.gc();
@@ -329,7 +328,6 @@ public class RenderTestBase {
        RenderSession session = sBridge.createSession(params);

        try {

            if (frameTimeNanos != -1) {
                session.setElapsedFrameTimeNanos(frameTimeNanos);
            }
@@ -338,12 +336,14 @@ public class RenderTestBase {
                getLogger().error(session.getResult().getException(),
                        session.getResult().getErrorMessage());
            }
            else {
                // Render the session with a timeout of 50s.
                Result renderResult = session.render(50000);
                if (!renderResult.isSuccess()) {
                    getLogger().error(session.getResult().getException(),
                            session.getResult().getErrorMessage());
                }
            }

            return RenderResult.getFromSession(session);
        } finally {