Skip to content

Occasional "Collection was modified" #519

Answered by egil
anddrzejb asked this question in Q&A
Discussion options

You must be logged in to vote

Interesting. If I read that stack trace right, the exception is coming from Blazors renderer. My guess is that it happens because your component under test is doing async work and is still adding components to the render tree when the test exits the test method.

This might help hint at a solution: https://bunit.dev/docs/interaction/awaiting-async-state.html

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@anddrzejb
Comment options

@egil
Comment options

egil Oct 19, 2021
Maintainer

@anddrzejb
Comment options

@egil
Comment options

egil Oct 19, 2021
Maintainer

Answer selected by anddrzejb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants