There is 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-93017977-0105-43a7-ae51-46c4ad6bc02b XWIKI-22341 Open

RealtimeWYSIWYGEditorIT.reloadEditorsMergeConflictManualSave is failing on chrome

 
View issue   ยท   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-4da30f50-3661-4fa4-914c-aacfb5cb553f Marius Dumitru Florea on 31/Jul/24 10:56
 

The test seems to fail, at least for me, only when using Chrome and the servlet engine runs inside a Docker container. I can't reproduce the test failure when using Jetty standalone (running directly on the host) and, what's more puzzling for me, I can't even reproduce when testing manually on the same test XWiki instance. The difference is that:

  • I'm using my local Chrome (running directly on the host), while the test is using a Chrome instance running inside a Docker container.
  • I'm accessing the test XWiki instance (running on Tomcat in a Docker container) using localhost and the exposed port, while during the test the Chrome instance from the Docker container accesses XWiki using xwikiweb domain that is configured when the Docker container is started.

I've added debug logs and can tell for sure that:

Still Chrome shows it as broken / missing. This is not a wait problem. The screencast continues a few seconds after the assert fails, and the image remains broken. The image is very small and displayed before during the test so it surely was cached by the browser.

Moreover, the image is properly loaded is I reset the image URL:

let src = image.src;
image.src = '';
image.src = src;

I don't understand why the image appears broken in Chrome. Maybe something aborts the image loading (e.g. because we update the image URL while the image is being loaded), but we see the image earlier in the test so it must be cached, so the loading should be instant. From the screencast it seems the image becomes broken right after realtime editing is established (right after connecting to the realtime session), which seems to correspond to the time when we patch the content (but there should be no change affecting the image). But why doesn't it reproduce when using Jetty standalone or when testing manually?...