Heya,
not sure if you’re still having the issue…
the error means that a db query is live when the test is torn down,
in our case it was due to some of our liveview tests clicking a submit button that caused a push_patch to happen in a live_component rather than the parent liveview,
for some reason LiveViewTest will wait for the patch if it happens in the parent process before returning, but not if it happens in a child component,
you can force it to wait by doing an assert_patch, or calling any of the functions that use the view
object
not sure if that helps you, but thought i’d add it as it was a little confusing
i raised an issue here LiveviewTest render_submit behaves differently if form is in parent liveview or child live_component · Issue #2579 · phoenixframework/phoenix_live_view · GitHub as the behaviour feels inconsistent