This issue has been created
There is 1 update.
 
 
XWiki Platform / cid:jira-generated-image-avatar-e69dceb4-b0cd-4237-b1c8-ed25736060a9 XWIKI-25302 Open

ActiveInstallsIT#verifyActiveInstalls is flickering

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-bfe920e1-fcc5-4017-831f-fe4a1016d49e Simon Urli created this issue on 15/Oct/26 09:31
 
Summary: ActiveInstallsIT#verifyActiveInstalls is flickering
Issue Type: cid:jira-generated-image-avatar-e69dceb4-b0cd-4237-b1c8-ed25736060a9 Bug
Affects Versions: 17.10.13
Assignee: Unassigned
Components: Development Issues only
Created: 15/Oct/26 09:31
Labels: flickering
Priority: cid:jira-generated-image-static-major-dd4deb55-7d93-426b-927c-166fa49b5ca1 Major
Reporter: Simon Urli
Description:

Symptom

org.xwiki.activeinstalls2.test.ui.ActiveInstallsIT#verifyActiveInstalls fails often on CI and failed every time locally.

The test waits up to 30s for the ping sent by XWiki at startup to appear in the installs3 Elasticsearch index:

client.indices().refresh();
...
while (count != 1 && (System.currentTimeMillis() - time) < 30000L) {
    count = client.count(b -> b.index("installs3")).count();
    Thread.sleep(100L);
}

But count() throws when the index doesn't exist yet, i.e. when the ping hasn't been indexed yet, so the loop never retries:

co.elastic.clients.elasticsearch._types.ElasticsearchException: [es/count] failed: [index_not_found_exception] no such index [installs3]
	at co.elastic.clients.elasticsearch.ElasticsearchClient.count(ElasticsearchClient.java:509)
	at org.xwiki.activeinstalls2.test.ui.ActiveInstallsIT.verifyActiveInstalls(ActiveInstallsIT.java:75)

On CI it also fails earlier, on the refresh() call, when Elasticsearch doesn't answer in time:

java.net.SocketTimeoutException: 30,000 milliseconds timeout on connection http-outgoing-0 [ACTIVE]
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:304)
	at org.xwiki.activeinstalls2.test.ui.ActiveInstallsIT.verifyActiveInstalls(ActiveInstallsIT.java:70)

Occurrences (Environment Tests, stable-17.10.x)

It also fails on stable-18.4.x. The test code is the same on stable-17.10.x, stable-18.4.x, stable-18.8.x and master.

Local reproduction

Run 3 times locally on stable-17.10.x commit 87df7079518 with PostgreSQL / Tomcat 11-jdk25 / S3 / Chrome: 0/3 passed, each time with the index_not_found_exception on the first count() call.

Fix direction

Treat a missing installs3 index as "count = 0" and keep polling until the timeout, instead of failing on the first call.

 
 

1 update

 
cid:jira-generated-image-avatar-bfe920e1-fcc5-4017-831f-fe4a1016d49e Changes by Simon Urli on 15/Oct/26 09:31
 
Flickering Test: org.xwiki.activeinstalls2.test.ui.AllIT$NestedActiveInstallsIT#verifyActiveInstalls