{"action":"created","issue":{"url":"https://api.github.com/repos/robolectric/robolectric/issues/1986","labels_url":"https://api.github.com/repos/robolectric/robolectric/issues/1986/labels{/name}","comments_url":"https://api.github.com/repos/robolectric/robolectric/issues/1986/comments","events_url":"https://api.github.com/repos/robolectric/robolectric/issues/1986/events","html_url":"https://github.com/robolectric/robolectric/issues/1986","id":100495985,"number":1986,"title":"SQLite error when running tests","user":{"login":"pdegand","id":3300620,"avatar_url":"https://avatars.githubusercontent.com/u/3300620?v=3","gravatar_id":"","url":"https://api.github.com/users/pdegand","html_url":"https://github.com/pdegand","followers_url":"https://api.github.com/users/pdegand/followers","following_url":"https://api.github.com/users/pdegand/following{/other_user}","gists_url":"https://api.github.com/users/pdegand/gists{/gist_id}","starred_url":"https://api.github.com/users/pdegand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdegand/subscriptions","organizations_url":"https://api.github.com/users/pdegand/orgs","repos_url":"https://api.github.com/users/pdegand/repos","events_url":"https://api.github.com/users/pdegand/events{/privacy}","received_events_url":"https://api.github.com/users/pdegand/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-08-12T08:49:09Z","updated_at":"2015-12-01T16:54:13Z","closed_at":null,"body":"Hello, I have troubles running my tests suite on Ubuntu (everything is running fine on my OSX environment). \r\n\r\nWhen i execute my full tests suites, the first tests are doing good, but they start to randomly crash with the following error (see below). \r\n\r\nAny hint on where this could come from ? Why is it happening only on Ubuntu and not on OSX ?\r\n\r\nThanks\r\n\r\nRobolectric 3.0\r\nShadow support v4 3.0\r\nGradle Wrapper 2.6\r\nandroid-gradle 1.3.0\r\n\r\n    java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.AssertionError: DB[46] will not dispose from a non-confining thread\r\n\t    at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:244)\r\n\t    at org.robolectric.RobolectricTestRunner.runChild(RobolectricTestRunner.java:188)\r\n\t    at org.robolectric.RobolectricTestRunner.runChild(RobolectricTestRunner.java:54)\r\n\t    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)\r\n\t    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)\r\n\t    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)\r\n\t    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)\r\n\t    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)\r\n\t    at org.robolectric.RobolectricTestRunner$1.evaluate(RobolectricTestRunner.java:152)\r\n\t    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)\r\n\t    at   org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:105)\r\n\t    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:56)\r\n\t    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:64)\r\n\t    at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:50)\r\n\t    at sun.reflect.GeneratedMethodAccessor158.invoke(Unknown Source)\r\n\t    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\t    at java.lang.reflect.Method.invoke(Method.java:606)\r\n\t    at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)\r\n\t    at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)\r\n\t    at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)\r\n\tat org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)\r\n\t    at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)\r\n\t    at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:106)\r\n\t    at sun.reflect.GeneratedMethodAccessor157.invoke(Unknown Source)\r\n\t    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\t    at java.lang.reflect.Method.invoke(Method.java:606)\r\n\t    at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)\r\n\t    at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)\r\n\t    at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:360)\r\n\t    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)\r\n\t    at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)\r\n\t    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)\r\n\t    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\r\n\t    at java.lang.Thread.run(Thread.java:745)\r\n    Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.AssertionError: DB[46] will not dispose from a non-confining thread\r\n\t    at org.robolectric.shadows.ShadowSQLiteConnection$Connections.execute(ShadowSQLiteConnection.java:477)\r\n\t    at org.robolectric.shadows.ShadowSQLiteConnection$Connections.close(ShadowSQLiteConnection.java:390)\r\n\t    at org.robolectric.shadows.ShadowSQLiteConnection$Connections.reset(ShadowSQLiteConnection.java:402)\r\n\t    at org.robolectric.shadows.ShadowSQLiteConnection.reset(ShadowSQLiteConnection.java:80)\r\n\t    at org.robolectric.Shadows.reset(Shadows.java:1626)\r\n\t    at org.robolectric.Robolectric.reset(Robolectric.java:22)\r\n\t    at org.robolectric.internal.ParallelUniverse.resetStaticState(ParallelUniverse.java:43)\r\n\t    at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:233)\r\n\t    ... 33 more\r\n    Caused by: java.util.concurrent.ExecutionException: java.lang.AssertionError: DB[46] will not dispose from a non-confining thread\r\n\t    at java.util.concurrent.FutureTask.report(FutureTask.java:122)\r\n\t    at java.util.concurrent.FutureTask.get(FutureTask.java:188)\r\n\t    at org.robolectric.shadows.ShadowSQLiteConnection$Connections.execute(ShadowSQLiteConnection.java:462)\r\n\t    ... 40 more\r\n    Caused by: java.lang.AssertionError: DB[46] will not dispose from a non-confining thread\r\n\t    at com.almworks.sqlite4java.Internal.recoverableError(Internal.java:46)\r\n\t    at com.almworks.sqlite4java.SQLiteConnection.dispose(SQLiteConnection.java:363)\r\n\t    at org.robolectric.shadows.ShadowSQLiteConnection$Connections$3.call(ShadowSQLiteConnection.java:394)\r\n\t    at org.robolectric.shadows.ShadowSQLiteConnection$Connections$6.call(ShadowSQLiteConnection.java:452)\r\n\t    at org.robolectric.shadows.ShadowSQLiteConnection$Connections$6.call(ShadowSQLiteConnection.java:446)\r\n\t    at java.util.concurrent.FutureTask.run(FutureTask.java:262)\r\n\t    ... 3 more"},"comment":{"url":"https://api.github.com/repos/robolectric/robolectric/issues/comments/161029579","html_url":"https://github.com/robolectric/robolectric/issues/1986#issuecomment-161029579","issue_url":"https://api.github.com/repos/robolectric/robolectric/issues/1986","id":161029579,"user":{"login":"sethgho","id":1034651,"avatar_url":"https://avatars.githubusercontent.com/u/1034651?v=3","gravatar_id":"","url":"https://api.github.com/users/sethgho","html_url":"https://github.com/sethgho","followers_url":"https://api.github.com/users/sethgho/followers","following_url":"https://api.github.com/users/sethgho/following{/other_user}","gists_url":"https://api.github.com/users/sethgho/gists{/gist_id}","starred_url":"https://api.github.com/users/sethgho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethgho/subscriptions","organizations_url":"https://api.github.com/users/sethgho/orgs","repos_url":"https://api.github.com/users/sethgho/repos","events_url":"https://api.github.com/users/sethgho/events{/privacy}","received_events_url":"https://api.github.com/users/sethgho/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T16:54:12Z","updated_at":"2015-12-01T16:54:12Z","body":"+1. This has dramatically ramped up our test flakiness since recently introducing SQLite into our app.\r\n\r\n> Are you leaking resources between tests?\r\n\r\nI think the static ShadowSQLiteConnection.CONNECTIONS pool is resource that is leaking between tests. I've got some very basic unit tests failing with that stack trace that have nothing to do with SQLite."}}