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

Commit 328c9e5a authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Android (Google) Code Review
Browse files

Merge "More diags for logic disabling other tests after a finalizer failure"...

Merge "More diags for logic disabling other tests after a finalizer failure" into ub-launcher3-master
parents 86c1807d 8211b6a0
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -78,10 +78,14 @@ public class FailureWatcher extends TestWatcher {
                try {
                    base.evaluate();
                } catch (Throwable e) {
                    if (!Log.getStackTraceString(e).contains(
                    final String stackTrace = Log.getStackTraceString(e);
                    if (!stackTrace.contains(
                            "androidx.test.internal.runner.junit4.statement.RunBefores.evaluate")) {
                        // Test failed to deinitialize. Since the global state is probably
                        // corrupted, won't execute other tests.
                        Log.d(TAG,
                                "Detected an exception from test finalizer, will skip further "
                                        + "tests: " + stackTrace);
                        sHadFailedTestDeinitialization = true;
                    }
                    throw e;