|
252 | 252 | <artifactId>jacoco-maven-plugin</artifactId>
|
253 | 253 | <version>0.8.13</version>
|
254 | 254 | <executions>
|
| 255 | + <!-- Collect coverage for unit tests --> |
255 | 256 | <execution>
|
| 257 | + <id>prepare-agent-ut</id> |
256 | 258 | <goals>
|
257 | 259 | <goal>prepare-agent</goal>
|
258 | 260 | </goals>
|
| 261 | + <configuration> |
| 262 | + <propertyName>argLine</propertyName> |
| 263 | + <destFile>${project.build.directory}/jacoco-ut.exec</destFile> |
| 264 | + </configuration> |
| 265 | + </execution> |
| 266 | + <!-- Collect coverage for integration tests tagged with @Tag("integration") --> |
| 267 | + <execution> |
| 268 | + <id>prepare-agent-it-tagged</id> |
| 269 | + <goals> |
| 270 | + <goal>prepare-agent</goal> |
| 271 | + </goals> |
| 272 | + <configuration> |
| 273 | + <propertyName>failsafeTaggedArgLine</propertyName> |
| 274 | + <destFile>${project.build.directory}/jacoco-it-tagged.exec</destFile> |
| 275 | + </configuration> |
| 276 | + </execution> |
| 277 | + <!-- Collect coverage for integration tests with filename suffix IntegrationTest(s) --> |
| 278 | + <execution> |
| 279 | + <id>prepare-agent-it-suffix</id> |
| 280 | + <goals> |
| 281 | + <goal>prepare-agent</goal> |
| 282 | + </goals> |
| 283 | + <configuration> |
| 284 | + <propertyName>failsafeSuffixArgLine</propertyName> |
| 285 | + <destFile>${project.build.directory}/jacoco-it-suffix.exec</destFile> |
| 286 | + </configuration> |
| 287 | + </execution> |
| 288 | + <!-- Merge all coverage data after all integration tests --> |
| 289 | + <execution> |
| 290 | + <id>merge-coverage</id> |
| 291 | + <phase>post-integration-test</phase> |
| 292 | + <goals> |
| 293 | + <goal>merge</goal> |
| 294 | + </goals> |
| 295 | + <configuration> |
| 296 | + <fileSets> |
| 297 | + <fileSet> |
| 298 | + <directory>${project.build.directory}</directory> |
| 299 | + <includes> |
| 300 | + <include>jacoco-ut.exec</include> |
| 301 | + <include>jacoco-it-tagged.exec</include> |
| 302 | + <include>jacoco-it-suffix.exec</include> |
| 303 | + </includes> |
| 304 | + </fileSet> |
| 305 | + </fileSets> |
| 306 | + <destFile>${project.build.directory}/jacoco-merged.exec</destFile> |
| 307 | + </configuration> |
259 | 308 | </execution>
|
| 309 | + <!-- Generate the final report on the merged data --> |
260 | 310 | <execution>
|
261 | 311 | <id>report</id>
|
262 |
| - <phase>test</phase> |
| 312 | + <phase>verify</phase> |
263 | 313 | <goals>
|
264 | 314 | <goal>report</goal>
|
265 | 315 | </goals>
|
| 316 | + <configuration> |
| 317 | + <dataFile>${project.build.directory}/jacoco-merged.exec</dataFile> |
| 318 | + </configuration> |
266 | 319 | </execution>
|
267 | 320 | </executions>
|
268 | 321 | </plugin>
|
|
282 | 335 | <systemPropertyVariables>
|
283 | 336 | <redis-hosts>${redis-hosts}</redis-hosts>
|
284 | 337 | </systemPropertyVariables>
|
| 338 | + <excludedGroups>integration,scenario</excludedGroups> |
285 | 339 | <excludes>
|
286 |
| - <exclude>**/examples/*Example.java</exclude> |
| 340 | + <exclude>**/examples/*.java</exclude> |
| 341 | + <exclude>**/scenario/*Test.java</exclude> |
| 342 | + <!-- Exclude integration tests from unit-test phase --> |
| 343 | + <exclude>**/*IntegrationTest.java</exclude> |
| 344 | + <exclude>**/*IntegrationTests.java</exclude> |
287 | 345 | </excludes>
|
288 | 346 | <!--<trimStackTrace>false</trimStackTrace>-->
|
289 | 347 | </configuration>
|
290 | 348 | </plugin>
|
| 349 | + <plugin> |
| 350 | + <artifactId>maven-failsafe-plugin</artifactId> |
| 351 | + <version>${maven.surefire.version}</version> |
| 352 | + <configuration> |
| 353 | + <argLine>@{failsafeSuffixArgLine} ${JVM_OPTS}</argLine> |
| 354 | + <systemPropertyVariables> |
| 355 | + <redis-hosts>${redis-hosts}</redis-hosts> |
| 356 | + </systemPropertyVariables> |
| 357 | + <!-- Default includes used when invoking failsafe goals directly (e.g., mvn failsafe:integration-test) --> |
| 358 | + <includes> |
| 359 | + <include>**/*IntegrationTest.java</include> |
| 360 | + <include>**/*IntegrationTests.java</include> |
| 361 | + </includes> |
| 362 | + <excludes> |
| 363 | + <exclude>**/examples/*.java</exclude> |
| 364 | + <exclude>**/scenario/*Test.java</exclude> |
| 365 | + <!-- Exclude unit tests --> |
| 366 | + <exclude>**/mocked/*.java</exclude> |
| 367 | + </excludes> |
| 368 | + </configuration> |
| 369 | + <executions> |
| 370 | + <!-- Run all tests tagged with @Tag("integration") regardless of file name --> |
| 371 | + <execution> |
| 372 | + <id>it-tagged</id> |
| 373 | + <goals> |
| 374 | + <goal>integration-test</goal> |
| 375 | + </goals> |
| 376 | + <configuration> |
| 377 | + <argLine>@{failsafeTaggedArgLine} ${JVM_OPTS}</argLine> |
| 378 | + <groups>integration</groups> |
| 379 | + <includes> |
| 380 | + <include>**/*Test.java</include> |
| 381 | + <include>**/*Tests.java</include> |
| 382 | + </includes> |
| 383 | + </configuration> |
| 384 | + </execution> |
| 385 | + <!-- Also run tests whose filenames end with IntegrationTest or IntegrationTests, even if not tagged --> |
| 386 | + <execution> |
| 387 | + <id>it-suffix</id> |
| 388 | + <goals> |
| 389 | + <goal>integration-test</goal> |
| 390 | + </goals> |
| 391 | + <configuration> |
| 392 | + <argLine>@{failsafeSuffixArgLine} ${JVM_OPTS}</argLine> |
| 393 | + |
| 394 | + <includes> |
| 395 | + <include>**/*IntegrationTest.java</include> |
| 396 | + <include>**/*IntegrationTests.java</include> |
| 397 | + </includes> |
| 398 | + </configuration> |
| 399 | + </execution> |
| 400 | + <!-- Verify phase should run once after both IT executions --> |
| 401 | + <execution> |
| 402 | + <id>it-verify</id> |
| 403 | + <goals> |
| 404 | + <goal>verify</goal> |
| 405 | + </goals> |
| 406 | + <configuration> |
| 407 | + <summaryFile>${project.build.directory}/failsafe-summary.xml</summaryFile> |
| 408 | + </configuration> |
| 409 | + </execution> |
| 410 | + </executions> |
| 411 | + </plugin> |
291 | 412 | <plugin>
|
292 | 413 | <artifactId>maven-source-plugin</artifactId>
|
293 | 414 | <version>3.3.1</version>
|
|
359 | 480 | <include>**/VAddParams.java</include>
|
360 | 481 | <include>**/VSimParams.java</include>
|
361 | 482 | <include>**/VSimScoreAttribs.java</include>
|
362 |
| - <include>**/*FunctionCommandsTest*</include> |
| 483 | + <include>**/*FunctionCommandsTest*.java</include> |
363 | 484 | <include>**/Endpoint.java</include>
|
364 | 485 | <include>src/main/java/redis/clients/jedis/mcf/*.java</include>
|
365 | 486 | <include>src/test/java/redis/clients/jedis/failover/*.java</include>
|
366 | 487 | <include>**/mcf/EchoStrategyIntegrationTest.java</include>
|
367 | 488 | <include>**/mcf/LagAwareStrategyUnitTest.java</include>
|
368 | 489 | <include>**/mcf/RedisRestAPI*.java</include>
|
369 | 490 | <include>**/mcf/ActiveActiveLocalFailoverTest*</include>
|
370 |
| - <include>**/mcf/FailbackMechanism*</include> |
371 |
| - <include>**/mcf/PeriodicFailbackTest*</include> |
372 |
| - <include>**/mcf/AutomaticFailoverTest*</include> |
373 |
| - <include>**/mcf/MultiCluster*</include> |
374 |
| - <include>**/mcf/StatusTracker*</include> |
| 491 | + <include>**/mcf/FailbackMechanism*.java</include> |
| 492 | + <include>**/mcf/PeriodicFailbackTest*.java</include> |
| 493 | + <include>**/mcf/AutomaticFailoverTest*.java</include> |
| 494 | + <include>**/mcf/MultiCluster*.java</include> |
| 495 | + <include>**/mcf/StatusTracker*.java</include> |
375 | 496 | <include>**/Health*.java</include>
|
376 | 497 | <include>src/main/java/redis/clients/jedis/MultiClusterClientConfig.java</include>
|
377 | 498 | <include>src/main/java/redis/clients/jedis/HostAndPort.java</include>
|
|
0 commit comments