-
Notifications
You must be signed in to change notification settings - Fork 306
Closed
Description
Issue Basics
- ObjectBox version (are using the latest version?): ANY (tried 1.2.1 and 1.4.4)
- Reproducibility: ALWAYS
Reproducing the bug
Description
*Espresso is finding an idling when using Box<T>.put(T)
. I'm using a BoxStore
as a Singleton and calling a box as: val box = RafaBoxStore.getInstance().getBoxFor(MyItem::class.java)
then using box.put(T).
When running instrumented tests, the app won't change the idle and Espresso will be waiting at least 45 seconds.*
fun saveOrUpdateMyItem(product: ProductItem) {
val box = RafaBoxStore.getInstance().getBoxFor(MyItem::class.java)
if (isItemSavedInBox(product)) {
addQuantityToProduct(product)
} else {
val myItem = MyItem()
myItem.setProduct(product)
box.put(myItem) /** THIS IS THE CASE **/
}
}
Logs & stackstraces
java.lang.RuntimeException: Could not launch intent Intent { flg=0x14000000 cmp=my.app.debug/my.app.debug.activities.ItemsActivity } within 45 seconds. Perhaps the main thread has not gone idle within a reasonable amount of time? There could be an animation or something constantly repainting the screen. Or the activity is doing network calls on creation? See the threaddump logs. For your reference the last time the event queue was idle before your activity launch request was 1522851145816 and now the last time the queue went idle was: 1522851145816. If these numbers are the same your activity might be hogging the event queue.
Metadata
Metadata
Assignees
Labels
No labels