Skip to content

forCurrentThread() not working in unit test #171

Closed
@merrickluo

Description

@merrickluo

In our application, we use thread to write and read database, so we wrapped all query method with forCurrentThread, it works great, but when I writing a unit test with Robolectric, greendao complain about query not on the owner thread. If I directly write and read data in test, it's working too. Hope someone could help me find out what happened here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions