Details
-
Bug
-
Resolution: Fixed
-
Major
-
18.8.0
-
Unknown
-
-
org.xwiki.search.test.ui.AllIT$NestedSearchSuggestIT#searchExclusions
Description
Symptom
SearchSuggestIT intermittently fails with a TimeoutException (10s) in QuickSearchElement.search() (line 46), while waiting for .searchSuggest li.showAllResults.loading to become visible. The CI screenshot shows the suggestion panel fully loaded with the expected results: the suggestions did load, but the loading class was never put on the "Go to search page" item.
Affected test methods:
- org.xwiki.search.test.ui.AllIT$NestedSearchSuggestIT#searchExclusions
- org.xwiki.search.test.ui.AllIT$NestedSearchSuggestIT#verifySearchSuggestTitles (first quick search of the test)
Evidence
- master #9012, searchExclusions: https://community.develocity.cloud/s/mfglr7ira2ami
- Env Tests master #1395 (MariaDB/Jetty 12/Firefox), verifySearchSuggestTitles: https://community.develocity.cloud/s/rffplu5sp5p46
- Env Tests stable-18.8.x #15 (Oracle/Firefox), verifySearchSuggestTitles: https://community.develocity.cloud/s/ei33ljwfdvkrk
About 3 failures out of ~1240 executions since 2026-09-07, on master and stable-18.8.x. The CI video shows "foobar" typed, then the panel with only "Go to search page..." and no spinner, then the results.
Root cause
suggest.js#prepareContainer adds the loading class to the loader node (the showAllResults item) only when the source result containers already exist. On the first getSuggestions call of a page, the containers are created and only they get loading. With one onKeyUp per typed character, the 2nd+ keystroke marks the loader node, which is why the page object wait usually works.
Since XWIKI-22936 (18.8.0-rc-1), the suggest widget is created asynchronously on the first focus/mouseenter of the search field, after fetching the sources and translations. When that fetch completes after sendKeys has typed the whole text, createSuggest calls getSuggestions only once, so the loader node never gets loading and the wait times out although the results are displayed.
The fix is in the QuickSearchElement page object: wait until at least one source result container exists and none of them is loading, instead of waiting for the loading class on the "Go to search page" item.
Only versions containing XWIKI-22936 (18.8.0-rc-1 and later) are affected; the LTS branches are not.
Attachments
Issue Links
- relates to
-
XWIKI-22936 XWiki.SearchSuggestCode is loaded too early
-
- Closed
-