Groups
Sign in
Groups
Robolectric
Conversations
About
Send feedback
Help
ShadowLegacySQLiteConnection vs. ShadowNativeSQLiteConnection
62 views
Skip to first unread message
Ken Yee
unread,
Nov 24, 2021, 12:00:47 PM
11/24/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Robolectric
How do you tell Robolectric 4.7.2 to use
ShadowNativeSQLiteConnection instead using the old legacy support?
The release notes say to use "
@SQLiteMode(NATIVE)" but doesn't say where to put this annotation?
(not on an M1 macbook)
Ken Yee
unread,
Nov 24, 2021, 1:38:18 PM
11/24/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Robolectric
FYI, you can use this system property:
robolectric.sqliteMode=NATIVE
utzcoz
unread,
Jan 13, 2022, 12:30:57 PM
1/13/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Robolectric
There is an example from Robolectric's test:
https://github.com/robolectric/robolectric/blob/0589cd7f5965ae00c9c8d40d757c6e5d21d30fb1/robolectric/src/test/java/org/robolectric/plugins/SQLiteModeConfigurerClassTest.java
.
```
@RunWith
(
AndroidJUnit4
.
class)
@SQLiteMode
(
Mode
.
LEGACY
)
public
class
SQLiteModeConfigurerClassTest
{
```
Ken Yee
unread,
Jan 20, 2022, 6:09:55 PM
1/20/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Robolectric
Our issue turned out to be Robolectric being used in non-Android module unit tests.
This was the fix if you're curious:
https://github.com/robolectric/robolectric/pull/6918
Reply all
Reply to author
Forward
0 new messages