Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getCauseStackTraceLines throws StringIndexOutOfBoundsException #2306

Open
mr-thierry opened this issue Oct 28, 2024 · 0 comments
Open

getCauseStackTraceLines throws StringIndexOutOfBoundsException #2306

mr-thierry opened this issue Oct 28, 2024 · 0 comments

Comments

@mr-thierry
Copy link

Description

Exception in the test runner

Steps to Reproduce

Generate a failure during a test

Expected Results

Test orchestrator generate the test report successfully

Actual Results

This is the stacktrace that shows the exception:

10-28 12:00:57.213  7455  7485 E TestRunner: java.lang.StringIndexOutOfBoundsException: length=117; index=290
10-28 12:00:57.213  7455  7485 E TestRunner: 	at java.lang.String.substring(String.java:1999)
10-28 12:00:57.213  7455  7485 E TestRunner: 	at androidx.test.services.events.internal.Throwables.getCauseStackTraceLines(Throwables.java:70)
10-28 12:00:57.213  7455  7485 E TestRunner: 	at androidx.test.services.events.internal.Throwables.getTrimmedStackTrace(Throwables.java:38)
10-28 12:00:57.213  7455  7485 E TestRunner: 	at androidx.test.services.events.internal.StackTrimmer.getTrimmedStackTrace(StackTrimmer.java:37)
10-28 12:00:57.213  7455  7485 E TestRunner: 	at androidx.test.services.events.ParcelableConverter.getFailure(ParcelableConverter.java:106)
10-28 12:00:57.213  7455  7485 E TestRunner: 	at androidx.test.services.events.ParcelableConverter.getFailuresFromList(ParcelableConverter.java:119)
10-28 12:00:57.213  7455  7485 E TestRunner: 	at androidx.test.internal.events.client.OrchestratedInstrumentationListener.testRunFinished(OrchestratedInstrumentationListener.java:84)
10-28 12:00:57.213  7455  7485 E TestRunner: 	at org.junit.runner.notification.SynchronizedRunListener.testRunFinished(SynchronizedRunListener.java:42)
10-28 12:00:57.213  7455  7485 E TestRunner: 	at org.junit.runner.notification.RunNotifier$2.notifyListener(RunNotifier.java:103)
10-28 12:00:57.213  7455  7485 E TestRunner: 	at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:72)
10-28 12:00:57.213  7455  7485 E TestRunner: 	at org.junit.runner.notification.RunNotifier.fireTestRunFinished(RunNotifier.java:100)
10-28 12:00:57.213  7455  7485 E TestRunner: 	at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
10-28 12:00:57.213  7455  7485 E TestRunner: 	at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
10-28 12:00:57.213  7455  7485 E TestRunner: 	at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:68)
10-28 12:00:57.213  7455  7485 E TestRunner: 	at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:59)

AndroidX Test and Android OS Versions

androidx.test:runner:1.6.2 on API 28

Link to a public git repo demonstrating the problem:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant