Skip to content

Commit

Permalink
HSEARCH-5094 Use distinct directories for reports when executing fail…
Browse files Browse the repository at this point in the history
…safe multiple times

So that the goal is cacheable for Develocity
  • Loading branch information
yrodiere committed Feb 29, 2024
1 parent 2da7d78 commit b99ca75
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 16 deletions.
8 changes: 6 additions & 2 deletions documentation/pom.xml
Expand Up @@ -122,7 +122,9 @@
</goals>
<configuration>
<skip>${test.lucene.skip}</skip>
<reportNameSuffix>${surefire.reportNameSuffix}-lucene</reportNameSuffix>
<reportNameSuffix>${surefire.executionIdentifier}-lucene</reportNameSuffix>
<reportsDirectory>${project.build.directory}/failsafe-reports/lucene</reportsDirectory>
<summaryFile>${project.build.directory}/failsafe-reports/lucene/failsafe-summary.xml</summaryFile>
<classpathDependencyExcludes>
<classpathDependencyExclude>org.hibernate.search:hibernate-search-backend-elasticsearch</classpathDependencyExclude>
</classpathDependencyExcludes>
Expand All @@ -141,7 +143,9 @@
</goals>
<configuration>
<skip>${test.elasticsearch.skip}</skip>
<reportNameSuffix>${surefire.reportNameSuffix}-elasticsearch</reportNameSuffix>
<reportNameSuffix>${surefire.executionIdentifier}-elasticsearch</reportNameSuffix>
<reportsDirectory>${project.build.directory}/failsafe-reports/elasticsearch</reportsDirectory>
<summaryFile>${project.build.directory}/failsafe-reports/elasticsearch/failsafe-summary.xml</summaryFile>
<classpathDependencyExcludes>
<classpathDependencyExclude>org.hibernate.search:hibernate-search-backend-lucene</classpathDependencyExclude>
</classpathDependencyExcludes>
Expand Down
16 changes: 12 additions & 4 deletions integrationtest/mapper/orm-jakarta-batch/pom.xml
Expand Up @@ -92,7 +92,9 @@
<goal>integration-test</goal>
</goals>
<configuration>
<reportNameSuffix>${surefire.reportNameSuffix}-lucene-jbatch</reportNameSuffix>
<reportNameSuffix>${surefire.executionIdentifier}-lucene-jbatch</reportNameSuffix>
<reportsDirectory>${project.build.directory}/failsafe-reports/lucene-jbatch</reportsDirectory>
<summaryFile>${project.build.directory}/failsafe-reports/lucene-jbatch/failsafe-summary.xml</summaryFile>
<classpathDependencyExcludes>
<classpathDependencyExclude>org.hibernate.search:hibernate-search-backend-elasticsearch</classpathDependencyExclude>
<classpathDependencyExclude>org.hibernate.search:hibernate-search-util-internal-integrationtest-jberet-se</classpathDependencyExclude>
Expand All @@ -111,7 +113,9 @@
<goal>integration-test</goal>
</goals>
<configuration>
<reportNameSuffix>${surefire.reportNameSuffix}-lucene-jberet</reportNameSuffix>
<reportNameSuffix>${surefire.executionIdentifier}-lucene-jberet</reportNameSuffix>
<reportsDirectory>${project.build.directory}/failsafe-reports/lucene-jberet</reportsDirectory>
<summaryFile>${project.build.directory}/failsafe-reports/lucene-jberet/failsafe-summary.xml</summaryFile>
<classpathDependencyExcludes>
<classpathDependencyExclude>org.hibernate.search:hibernate-search-backend-elasticsearch</classpathDependencyExclude>
<classpathDependencyExclude>org.hibernate.search:hibernate-search-util-internal-integrationtest-jbatch-runtime</classpathDependencyExclude>
Expand All @@ -130,7 +134,9 @@
</goals>
<configuration>
<skip>${test.elasticsearch.skip}</skip>
<reportNameSuffix>${surefire.reportNameSuffix}-elasticsearch-jbatch</reportNameSuffix>
<reportNameSuffix>${surefire.executionIdentifier}-elasticsearch-jbatch</reportNameSuffix>
<reportsDirectory>${project.build.directory}/failsafe-reports/elasticsearch-jbatch</reportsDirectory>
<summaryFile>${project.build.directory}/failsafe-reports/elasticsearch-jbatch/failsafe-summary.xml</summaryFile>
<classpathDependencyExcludes>
<classpathDependencyExclude>org.hibernate.search:hibernate-search-backend-lucene</classpathDependencyExclude>
<classpathDependencyExclude>org.hibernate.search:hibernate-search-util-internal-integrationtest-jberet-se</classpathDependencyExclude>
Expand All @@ -150,7 +156,9 @@
</goals>
<configuration>
<skip>${test.elasticsearch.skip}</skip>
<reportNameSuffix>${surefire.reportNameSuffix}-elasticsearch-jberet</reportNameSuffix>
<reportNameSuffix>${surefire.executionIdentifier}-elasticsearch-jberet</reportNameSuffix>
<reportsDirectory>${project.build.directory}/failsafe-reports/elasticsearch-jberet</reportsDirectory>
<summaryFile>${project.build.directory}/failsafe-reports/elasticsearch-jberet/failsafe-summary.xml</summaryFile>
<classpathDependencyExcludes>
<classpathDependencyExclude>org.hibernate.search:hibernate-search-backend-lucene</classpathDependencyExclude>
<classpathDependencyExclude>org.hibernate.search:hibernate-search-util-internal-integrationtest-jbatch-runtime</classpathDependencyExclude>
Expand Down
12 changes: 9 additions & 3 deletions integrationtest/mapper/orm-realbackend/pom.xml
Expand Up @@ -78,7 +78,9 @@
</goals>
<configuration>
<skip>${test.lucene.skip}</skip>
<reportNameSuffix>${surefire.reportNameSuffix}-lucene</reportNameSuffix>
<reportNameSuffix>${surefire.executionIdentifier}-lucene</reportNameSuffix>
<reportsDirectory>${project.build.directory}/failsafe-reports/lucene</reportsDirectory>
<summaryFile>${project.build.directory}/failsafe-reports/lucene/failsafe-summary.xml</summaryFile>
<classpathDependencyExcludes>
<classpathDependencyExclude>org.hibernate.search:hibernate-search-backend-elasticsearch</classpathDependencyExclude>
</classpathDependencyExcludes>
Expand All @@ -99,7 +101,9 @@
</goals>
<configuration>
<skip>${test.elasticsearch.skip}</skip>
<reportNameSuffix>${surefire.reportNameSuffix}-elasticsearch</reportNameSuffix>
<reportNameSuffix>${surefire.executionIdentifier}-elasticsearch</reportNameSuffix>
<reportsDirectory>${project.build.directory}/failsafe-reports/elasticsearch</reportsDirectory>
<summaryFile>${project.build.directory}/failsafe-reports/elasticsearch/failsafe-summary.xml</summaryFile>
<classpathDependencyExcludes>
<classpathDependencyExclude>org.hibernate.search:hibernate-search-backend-lucene</classpathDependencyExclude>
</classpathDependencyExcludes>
Expand All @@ -120,7 +124,9 @@
</goals>
<configuration>
<skip>${test.multiplebackends.skip}</skip>
<reportNameSuffix>${surefire.reportNameSuffix}-multiplebackends</reportNameSuffix>
<reportNameSuffix>${surefire.executionIdentifier}-multiplebackends</reportNameSuffix>
<reportsDirectory>${project.build.directory}/failsafe-reports/multiplebackends</reportsDirectory>
<summaryFile>${project.build.directory}/failsafe-reports/multiplebackends/failsafe-summary.xml</summaryFile>
<includes>
<exclude>org.hibernate.search.integrationtest.mapper.orm.realbackend.bootstrap.ElasticsearchBackendTypeAutoDetectMultipleBackendTypesInClasspathIT</exclude>
<exclude>org.hibernate.search.integrationtest.mapper.orm.realbackend.bootstrap.LuceneBackendTypeAutoDetectMultipleBackendTypesInClasspathIT</exclude>
Expand Down
8 changes: 6 additions & 2 deletions integrationtest/mapper/pojo-standalone-realbackend/pom.xml
Expand Up @@ -60,7 +60,9 @@
</goals>
<configuration>
<skip>${test.lucene.skip}</skip>
<reportNameSuffix>${surefire.reportNameSuffix}-lucene</reportNameSuffix>
<reportNameSuffix>${surefire.executionIdentifier}-lucene</reportNameSuffix>
<reportsDirectory>${project.build.directory}/failsafe-reports/lucene</reportsDirectory>
<summaryFile>${project.build.directory}/failsafe-reports/lucene/failsafe-summary.xml</summaryFile>
<classpathDependencyExcludes>
<classpathDependencyExclude>org.hibernate.search:hibernate-search-backend-elasticsearch</classpathDependencyExclude>
</classpathDependencyExcludes>
Expand All @@ -79,7 +81,9 @@
</goals>
<configuration>
<skip>${test.elasticsearch.skip}</skip>
<reportNameSuffix>${surefire.reportNameSuffix}-elasticsearch</reportNameSuffix>
<reportNameSuffix>${surefire.executionIdentifier}-elasticsearch</reportNameSuffix>
<reportsDirectory>${project.build.directory}/failsafe-reports/elasticsearch</reportsDirectory>
<summaryFile>${project.build.directory}/failsafe-reports/elasticsearch/failsafe-summary.xml</summaryFile>
<classpathDependencyExcludes>
<classpathDependencyExclude>org.hibernate.search:hibernate-search-backend-lucene</classpathDependencyExclude>
</classpathDependencyExcludes>
Expand Down
8 changes: 6 additions & 2 deletions integrationtest/showcase/library/pom.xml
Expand Up @@ -146,7 +146,9 @@
</goals>
<configuration>
<skip>${test.lucene.skip}</skip>
<reportNameSuffix>${surefire.reportNameSuffix}-lucene</reportNameSuffix>
<reportNameSuffix>${surefire.executionIdentifier}-lucene</reportNameSuffix>
<reportsDirectory>${project.build.directory}/failsafe-reports/lucene</reportsDirectory>
<summaryFile>${project.build.directory}/failsafe-reports/lucene/failsafe-summary.xml</summaryFile>
<systemPropertyVariables>
<!-- See TestActiveProfilesResolver -->
<test.backend>lucene</test.backend>
Expand All @@ -160,7 +162,9 @@
</goals>
<configuration>
<skip>${test.elasticsearch.skip}</skip>
<reportNameSuffix>${surefire.reportNameSuffix}-elasticsearch</reportNameSuffix>
<reportNameSuffix>${surefire.executionIdentifier}-elasticsearch</reportNameSuffix>
<reportsDirectory>${project.build.directory}/failsafe-reports/elasticsearch</reportsDirectory>
<summaryFile>${project.build.directory}/failsafe-reports/elasticsearch/failsafe-summary.xml</summaryFile>
<systemPropertyVariables>
<!-- See TestActiveProfilesResolver -->
<test.backend>elasticsearch</test.backend>
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Expand Up @@ -416,7 +416,7 @@
<failsafe.spring.skip>false</failsafe.spring.skip>

<!-- This allows us to distinguish between multiple executions of the same test in test reports. -->
<surefire.reportNameSuffix>${surefire.module}-${surefire.environment}</surefire.reportNameSuffix>
<surefire.executionIdentifier>${surefire.module}-${surefire.environment}</surefire.executionIdentifier>
<!-- This should be set from the command line by CI jobs that execute the same tests in multiple environments -->
<surefire.environment>default</surefire.environment>
<!-- This should be set in modules that re-execute tests imported from a dependency (using <dependenciesToScan>)
Expand Down Expand Up @@ -808,7 +808,7 @@
<usePhrasedClassNameInRunning>true</usePhrasedClassNameInRunning>
<usePhrasedClassNameInTestCaseSummary>true</usePhrasedClassNameInTestCaseSummary>
</statelessTestsetInfoReporter>
<reportNameSuffix>${surefire.reportNameSuffix}</reportNameSuffix>
<reportNameSuffix>${surefire.executionIdentifier}</reportNameSuffix>
</configuration>
<dependencies>
<!--
Expand Down Expand Up @@ -869,7 +869,7 @@
<usePhrasedClassNameInRunning>true</usePhrasedClassNameInRunning>
<usePhrasedClassNameInTestCaseSummary>true</usePhrasedClassNameInTestCaseSummary>
</statelessTestsetInfoReporter>
<reportNameSuffix>${surefire.reportNameSuffix}</reportNameSuffix>
<reportNameSuffix>${surefire.executionIdentifier}</reportNameSuffix>
</configuration>
<dependencies>
<!--
Expand Down

0 comments on commit b99ca75

Please sign in to comment.