Open davedesro opened 13 years ago
The implementation of transactions in Robolectric is too simple for SQLite. I'm not sure what exactly what to do about it at the moment, it will take more investigation than the 2 hours I put in tonight to understand it. And I currently don't have the time to spare.
I'm glad someone else is using making use of this project though!
it looks as though locking needs to be set up wherever robolectric writes to the database, so multithreading works properly.
Is this something that needs to be done in robolectric-sqlite or somewhere else?
This would need to be added to the Shadow classes of Robolectric itself, primarily ShadowSQLiteDatabase
Though it would probably be easier\better to just use Robolectric 2.0 (the Reviscerated branch) with the real android jars. Though that branch needs a bit of work before sqlite works on it. Which I intend to do once the Android sourcecode is available again, Currently http://android.git.kernel.org/ is down. See the following post about the reviscerated branch: http://robolectric.blogspot.com/2011/08/using-robolectric-with-real-android.html
Hi! thanks a bunch for this jar! It enabled us to use google analytics in our project :) We had to comment out a test in robolectric, though...
Tests in error: testFailureTransaction(com.xtremelabs.robolectric.shadows.SQLiteDatabaseTest)
It likely started breaking with this recent robolectric commit:
https://github.com/pivotal/robolectric/commit/b2a0c4643204a58730caf4e178e6acb36db79a5d#src/test/java/com/xtremelabs/robolectric/shadows/SQLiteDatabaseTest.java
Any idea?
thanks!!