opendevstack / ods-jenkins-shared-library

Shared Jenkins library which all ODS projects & components use - provisioning, SonarQube code scanning, Nexus publishing, OpenShift template based deployments and repository orchestration
Apache License 2.0
74 stars 57 forks source link

The Acceptance, Installation and Integration Tests are being executed twice making the Release Manager fail #874

Open angelmp01 opened 2 years ago

angelmp01 commented 2 years ago

Describe the bug During the specification of an EDP Test Project in the Dev environment, when we tried to run a Developer Preview, the Release Manager, returned the following error:

java.lang.IllegalStateException: Error: the following test cases are implemented multiple times each: TWRFDGP-129.

After an investigation, we've seen that during the execution of the Acceptance, Installation and Integration Tests, the tests are executed twice as you can see in the below code snippet:

> Task :installation-java
Picked up JAVA_TOOL_OPTIONS: -XX:+UnlockExperimentalVMOptions -Dsun.zip.disableMemoryMapping=true

[0K[1mDemoInstallation[m
[0K[1m  Test [22mTWRFDGP131_basic test[32m PASSED[m
[0K[1;32mSUCCESS: [39mExecuted 1 tests in 9.6s[m

> Task :installation-groovy
Picked up JAVA_TOOL_OPTIONS: -XX:+UnlockExperimentalVMOptions -Dsun.zip.disableMemoryMapping=true

[0K[1mDemoInstallation[m
[0K[1m  Test [22mTWRFDGP131_basic test[32m PASSED[m
[0K[1;32mSUCCESS: [39mExecuted 1 tests in 9.1s[m

> Task :compileIntegrationJava
> Task :compileIntegrationGroovy
> Task :processIntegrationResources
> Task :integrationClasses
> Task :integration-java
Picked up JAVA_TOOL_OPTIONS: -XX:+UnlockExperimentalVMOptions -Dsun.zip.disableMemoryMapping=true

[0K[1mDemoIntegration[m
[0K[1m  Test [22mTWRFDGP127_basic test[32m PASSED[m
[0K[1m  Test [22mTWRFDGP128_basic test[32m PASSED[m
[0K[1;32mSUCCESS: [39mExecuted 2 tests in 9.5s[m

> Task :integration-groovy
Picked up JAVA_TOOL_OPTIONS: -XX:+UnlockExperimentalVMOptions -Dsun.zip.disableMemoryMapping=true

[0K[1mDemoIntegration[m
[0K[1m  Test [22mTWRFDGP127_basic test[32m PASSED[m
[0K[1m  Test [22mTWRFDGP128_basic test[32m PASSED[m
[0K[1;32mSUCCESS: [39mExecuted 2 tests in 9s[m

> Task :compileAcceptanceJava
> Task :compileAcceptanceGroovy
> Task :processAcceptanceResources
> Task :acceptanceClasses
> Task :acceptance-java
Picked up JAVA_TOOL_OPTIONS: -XX:+UnlockExperimentalVMOptions -Dsun.zip.disableMemoryMapping=true

[0K[1mDemoAcceptance[m
[0K[1m  Test [22mTWRFDGP129_goes to GH ods-quickstarters[32m PASSED[m
[0K[1;32mSUCCESS: [39mExecuted 1 tests in 8.7s[m

> Task :acceptance-groovy
Picked up JAVA_TOOL_OPTIONS: -XX:+UnlockExperimentalVMOptions -Dsun.zip.disableMemoryMapping=true

[0K[1mDemoAcceptance[m
[0K[1m  Test [22mTWRFDGP129_goes to GH ods-quickstarters[32m PASSED[m
[0K[1;32mSUCCESS: [39mExecuted 1 tests in 9.4s[m

To Reproduce

  1. Configure a new EDP project with a test component configured with the quickstarter e2e-spock-geb and a release
  2. Add groovy tests to the geb-spock test component
  3. Execute the releasemanager pipeline

Expected behavior Tests defined in geb-spock component executes only one time in every execution of the releasemanager pipeline

Affected version (please complete the following information):

Additional context The last changes added in TestExecutionPhases.groovy to fix (- Default acceptance test in Spock makes the pipeline runs forever (#706)) genereates this bad behaviour of the execution of the tests

metmajer commented 2 years ago

FYI @braisvq1996

metmajer commented 1 year ago

@angelmp01 I believe this has been addressed. If yes, please close.