Fixed
Status Update
Comments
uc...@google.com <uc...@google.com>
ja...@google.com <ja...@google.com> #2
Thanks. We will take a look. Even though we need to figure out a way to reliably detect when a Service is actually shutdown. Thanks for the sample project makes it a lot easier to reproduce the issue.
sl...@google.com <sl...@google.com> #3
sl...@google.com <sl...@google.com>
st...@gmail.com <st...@gmail.com> #4
I don't know the inner workings of this, but there seems to be a connection to Issue 36949180 : ServiceTestRule.bindService() returns null on 2nd invocation.
Issue 36949180 has a workaround where you repeat "serviceRule.bindService(intent)" until it no longer returns null. I tried the FooServiceTest in multiple-service-calls-test.tgz in my own project setting and test 2 to 5 failed. However, all tests succeeded after changing the bindService() method to repeatedly bind inside a while loop until the returned binder is not null.
Description
This is using version 0.5 of the runner artifact.
E/TestExecutor( 5297): Fatal exception when running tests
E/TestExecutor( 5297): java.lang.NullPointerException: Attempt to invoke interface method 'int java.lang.CharSequence.length()' on a null object reference
E/TestExecutor( 5297): at java.util.regex.Matcher.reset(Matcher.java:177)
E/TestExecutor( 5297): at java.util.regex.Matcher.<init>(Matcher.java:90)
E/TestExecutor( 5297): at java.util.regex.Pattern.matcher(Pattern.java:297)
E/TestExecutor( 5297): at android.support.test.internal.runner.TestRequestBuilder$MethodFilter.stripParameterizedSuffix(TestRequestBuilder.java:503)
E/TestExecutor( 5297): at android.support.test.internal.runner.TestRequestBuilder$MethodFilter.shouldRun(TestRequestBuilder.java:486)
E/TestExecutor( 5297): at android.support.test.internal.runner.TestRequestBuilder$ClassAndMethodFilter.shouldRun(TestRequestBuilder.java:421)
E/TestExecutor( 5297): at org.junit.runner.manipulation.Filter$3.shouldRun(Filter.java:112)
E/TestExecutor( 5297): at org.junit.runners.ParentRunner.shouldRun(ParentRunner.java:434)
E/TestExecutor( 5297): at org.junit.runners.ParentRunner.filter(ParentRunner.java:382)
E/TestExecutor( 5297): at org.junit.runner.manipulation.Filter.apply(Filter.java:97)
E/TestExecutor( 5297): at android.support.test.internal.runner.TestRequestBuilder$LenientFilterRequest.getRunner(TestRequestBuilder.java:381)
E/TestExecutor( 5297): at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
E/TestExecutor( 5297): at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:59)
E/TestExecutor( 5297): at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:262)
E/TestExecutor( 5297): at com.example.MyTestRunner.onStart(MyTestRunner.java:89)
E/TestExecutor( 5297): at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1853)