Hi Team, Sometime back build was failing for branches because of new trunk only fixture usage of SEGMENT_TAR. As this fixture was not present on the branch it caused the build to fail.
My initial attempt to fix this was to ignore exception when FixturesHelper resolves enum like SEGMENT_TAR on branch [1]. With this build comes fine but I have a hunch that current fix would lead to all fixtures getting activated and that would cause waste of time A- Which solution to use ================ So have 2 options 1. Treat SEGMENT_TAR as SEGMENT_MK for branches - This would cause test to run 2 times against SEGMENT_MK 2. Create separate build profile for branches B - Use of nsfixtures system property ========================== However before doing that I am trying to understand how the fixture get set. From CI logs the command that gets fired is --- /home/jenkins/tools/maven/apache-maven-3.2.1/bin/mvn -Dnsfixtures=DOCUMENT_NS -Dlabel=Ubuntu -Djdk=jdk1.8.0_11 -Dprofile=integrationTesting clean verify -PintegrationTesting -Dsurefire.skip.ut=true -Prdb-derby -DREMOVEMErdb.jdbc- --- It sets system property 'nsfixtures' to required fixture. However in our parent pom we rely on system property 'fixtures' which defaults to SEGMENT_MK. And in no place we override 'fixtures' in our CI. Looking at all things it appears to me that currently all test are only running against SEGMENT_MK fixture and other fixtures are not getting used. But then exception should not have come with usage of SEGMENT_TAR. So I am missing some connection here in the build process >From my test it appears that if we specify a system property in mvn command line and same property is configured in maven-surefire-plugin then property specified in command line is used and one in pom.xml is ignored. That would explain why settings in pom.xml are not used for fixture So what should we opt for #A? My vote would be for A1! Chetan Mehrotra [1] https://github.com/apache/jackrabbit-oak/commit/319433e9400429592065d4b3997dd31f93b6c549 [2] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-parent/pom.xml#L289 <plugin> <artifactId>maven-failsafe-plugin</artifactId> <configuration> <argLine>${test.opts}</argLine> <systemPropertyVariables> <known.issues>${known.issues}</known.issues> <mongo.host>${mongo.host}</mongo.host> <mongo.port>${mongo.port}</mongo.port> <mongo.db>${mongo.db}</mongo.db> <mongo.db2>${mongo.db2}</mongo.db2> <nsfixtures>${fixtures}</nsfixtures> <derby.stream.error.file>${project.build.directory}/derby.log</derby.stream.error.file> </systemPropertyVariables> </configuration> </plugin>
