ShadowLegacySQLiteConnection vs. ShadowNativeSQLiteConnection

64 views
Skip to first unread message

Ken Yee

unread,
Nov 24, 2021, 12:00:47 PM11/24/21
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 PM11/24/21
to Robolectric
FYI,  you can use this system property:
robolectric.sqliteMode=NATIVE

utzcoz

unread,
Jan 13, 2022, 12:30:57 PM1/13/22
to Robolectric

```
@RunWith(AndroidJUnit4.class)

@SQLiteMode(Mode.LEGACY)
public class SQLiteModeConfigurerClassTest {
```

Ken Yee

unread,
Jan 20, 2022, 6:09:55 PM1/20/22
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