This issue has been created
There are 8 updates, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-cd3b1a95-d8ac-4fe3-9a84-938e0b32aa81 XWIKI-25768 Closed

Combine the profiles and servletEngineNetworkAliases system properties with the @UITest values instead of ignoring them

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-6b028e42-01b2-4548-96d1-85dd6b252110 Vincent Massol created this issue on 14/Nov/26 11:23
 
Summary: Combine the profiles and servletEngineNetworkAliases system properties with the @UITest values instead of ignoring them
Issue Type: cid:jira-generated-image-avatar-cd3b1a95-d8ac-4fe3-9a84-938e0b32aa81 Improvement
Affects Versions: 10.11-rc-1
Assignee: Unassigned
Components: Test Framework
Created: 14/Nov/26 11:23
Priority: cid:jira-generated-image-static-major-cf5beca9-2f81-48a9-86fd-426cb83d3132 Major
Reporter: Vincent Massol
Description:

The Docker test framework documents that "System properties have priority over Java annotation attributes", and every @UITest option behaves that way except two list options, which read their system property only when the annotation leaves them empty:

  • profiles (xwiki.test.ui.profiles)
  • servletEngineNetworkAliases (xwiki.test.ui.servletEngineNetworkAliases)

So as soon as a test sets one of them in its annotation, the matching system property is silently ignored.

Example

Modules activate the clover Maven profile for their functional tests by setting <xwiki.test.ui.profiles>clover</xwiki.test.ui.profiles> in their pom (e.g. xwiki-platform-distribution-flavor-test-docker). ExtensionSecurityScanIT in that module has @UITest(standardFlavor = true, profiles = "legacy"). Run standalone (-Dit.test=ExtensionSecurityScanIT), its profiles are only legacy: clover is dropped without any warning. Inside AllIT it happens to work, only because the profiles of the nested test classes are merged and the other nested classes fall back to the system property.

Expected

For these two options, combine the values: the annotation's values first, then the system property's, without duplicates. Replacing the annotation's values with the property's would drop legacy, which the test needs; combining is also what already happens when the configurations of nested test classes are merged.

 
 

8 updates

 
cid:jira-generated-image-avatar-6b028e42-01b2-4548-96d1-85dd6b252110 Changes by Vincent Massol on 14/Nov/26 11:23
 
Fix Version: 18.10.0-rc-1
Documentation in Release Notes: N/A
Documentation: N/A
Assignee: Vincent Massol
Priority: Major Minor
Resolution: Fixed
Tests: Unit
Status: Open Closed
 
 

1 comment

 
cid:jira-generated-image-avatar-6b028e42-01b2-4548-96d1-85dd6b252110 Vincent Massol on 14/Nov/26 11:32
 

Note that the doc already documents what's been fixed.