Closed f1ames closed 1 month ago
After #543, it seems this is not flaky test in fact, but really a regression from #534. Test is failing randomly still after improvements from #543 so there might be race condition or something similar going on.
Ok, some initial observations. I'll put my console dump first (you can skip it first and go to conclusions first) which might not be really readable but still (and at least useful for me) and then refer to it.
You can find a diff of the above here - https://www.diffchecker.com/H91iddhW/.
footer
root (see https://github.com/ckeditor/ckeditor5-react/pull/535/files#diff-5b81880d0441ee0751e0a44635f33052c1176a93a78f4ef4914b85e42adc265fR23).#error-writer-detachroot-no-root
when footer
root is about to be detached. And so assert gets data from new editor instance - see diff screenshot below (important - I would assume after editor is restarted by watchdog it should have the same contents than previous instance, either it's broken too or race condition here so data is not yet set on new instance).footer
detach fails (here I'm still looking into why it happens, looks like trying to detach the same root multiple times is also some outdated state issue).watchdog [true, false]
) it fails like 30%. When I run the test only with watchdog (by modifying this for
) it seems to fail always. Running it with "npx vitest run -t 'should assign properly data
property to editor even if it is still mounting'".v9.3.0
and modified the test and it fails the same way. See the branch - https://github.com/ckeditor/ckeditor5-react/tree/t/542-test (you should run only this test, others will fail since I did not adjusted assertions there - "npx vitest run -t 'should assign properly data
property to editor even if it is still mounting'").console.warn
and console.error
to empty functions, which makes noticing errors (like the one from this issue) really time consuming.@Mati365 I guess it was closed incidentally, right? We concluded that #543 does not fix it.
Yep, sorry.
The
should assign properly data property to editor even if it is still mounting
(see here) test fails randomly with:See on CI.
https://github.com/ckeditor/ckeditor5-react/blob/8886ca37769cd5145e6c6249ea5859a60ee9120b/tests/useMultiRootEditor.test.tsx#L903
It might be related to using timeouts:
https://github.com/ckeditor/ckeditor5-react/blob/8886ca37769cd5145e6c6249ea5859a60ee9120b/tests/useMultiRootEditor.test.tsx#L938-L955
What's worth mentioning is that it seems it got more unstable after #534 PR got merged.