[ 
https://issues.apache.org/jira/browse/SUREFIRE-1747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17023956#comment-17023956
 ] 

Tibor Digana commented on SUREFIRE-1747:
----------------------------------------

Check it out with the SNAPSHOT version or clone the project from GitHub and 
install it by skipping the tests (mvn install -DskipTests) and you will have 
success with your demo project. The statistics are perfectly fine, see this:


{noformat}
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.2.4.RELEASE)

2020-01-26 23:48:39.645  INFO 18476 --- [           main] 
a.f.s.r.d.HelloControllerIntegrationTest : Starting 
HelloControllerIntegrationTest on DESKTOP-OMLV2EF with PID 18476 (started by 
tibor17 in c:\vcs\github\SUREFIRE-1747)
2020-01-26 23:48:39.648  INFO 18476 --- [           main] 
a.f.s.r.d.HelloControllerIntegrationTest : No active profile set, falling back 
to default profiles: default
2020-01-26 23:48:43.028  INFO 18476 --- [           main] 
o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 
'applicationTaskExecutor'
2020-01-26 23:48:43.717  INFO 18476 --- [           main] 
o.s.b.t.m.w.SpringBootMockServletContext : Initializing Spring 
TestDispatcherServlet ''
2020-01-26 23:48:43.717  INFO 18476 --- [           main] 
o.s.t.web.servlet.TestDispatcherServlet  : Initializing Servlet ''
2020-01-26 23:48:43.741  INFO 18476 --- [           main] 
o.s.t.web.servlet.TestDispatcherServlet  : Completed initialization in 23 ms
2020-01-26 23:48:43.776  INFO 18476 --- [           main] 
a.f.s.r.d.HelloControllerIntegrationTest : Started 
HelloControllerIntegrationTest in 4.597 seconds (JVM running for 6.106)
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.821 s 
- in org.at.failsafe.springboot.repackage.demo.HelloControllerIntegrationTest
2020-01-26 23:48:44.433  INFO 18476 --- [extShutdownHook] 
o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 
'applicationTaskExecutor'
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-failsafe-plugin:3.0.0-SNAPSHOT:verify (default) @ demo ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
{noformat}


> spring-boot-maven-plugin with goal repackage make tests to silently not 
> execute
> -------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1747
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1747
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Failsafe Plugin
>    Affects Versions: 3.0.0-M4
>            Reporter: Atle Tokle
>            Assignee: Tibor Digana
>            Priority: Major
>         Attachments: demo.zip
>
>
> When integration-testing a spring boot application, and also having this 
> plugin:
> {code:xml}
>             <plugin>
>                 <groupId>org.springframework.boot</groupId>
>                 <artifactId>spring-boot-maven-plugin</artifactId>
>                 <executions>
>                     <execution>
>                         <goals>
>                             <goal>repackage</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>             </plugin>
>  {code}
> the test is not executed by maven-failsafe-plugin. And no errors or warnings 
> is displayed to indicate that code is not tested.
> When configuring phace like this they are executed
> {code:xml}
>             <plugin>
>                 <groupId>org.springframework.boot</groupId>
>                 <artifactId>spring-boot-maven-plugin</artifactId>
>                 <executions>
>                     <execution>
>                         <phase>post-integration-test</phase>
>                         <goals>
>                             <goal>repackage</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>             </plugin>
> {code}
> I found the answer here 
> https://stackoverflow.com/questions/50705270/mvn-spring-boot-plugin-breaks-integration-testing
> But the build should either break or tests run.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to