Hey,
I’ve been investigating the issue with SQLStore testing through Robolectric and this is
what I’ve found.
Those tests run correctly on linux with both Java 1.6 and Java 1.7 and also works on Mac
OS X with Java 1.6. This unfortunately doesn’t apply for the Java 1.7 on Mac and the test
is failing. And because I think that this test should definitely not be @Ignore-d all the
time, I’ve come up with following solution.
In JUnit, there’s a way to decide whether to run a test or not in runtime, based on
org.junit.Assume. This way, we could easily ignore the SQLStoreTest when running on Mac OS
X with Java 1.7, but leave it on other platforms. I’ve already taken the liberty to write
this down and I’ve bundled it into the PR [1] which is fixing the doubly-called
Callback#onSuccess bug (AGDROID-150).
What do you guys think about this solution, or should I say workaround? Of course it’s not
perfect, it would be cool if we could run even the SQLStoreTest on all platforms without
any difference, but right now it seems to be a incompatibility of SQLite with Mac’s Java
1.7.
1 -
https://github.com/aerogear/aerogear-android/pull/120
—
Tadeas Kriz
tkriz(a)redhat.com