You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Vincent Massol (JIRA)" <ji...@codehaus.org> on 2006/03/10 14:24:23 UTC

[jira] Created: (MNG-2142) Forcing execution of the post-integration-test phase

Forcing execution of the post-integration-test phase
----------------------------------------------------

         Key: MNG-2142
         URL: http://jira.codehaus.org/browse/MNG-2142
     Project: Maven 2
        Type: Improvement

  Components: integration tests  
    Versions: 2.0.3    
    Reporter: Vincent Massol


The post-integration-test phase needs to always be called even in case of tests failures in the integration-test phase. 

For example when using Cargo the container may be left running if the post-integration-test phase is not called...



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (MNG-2142) Forcing execution of the post-integration-test phase

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2142?page=all ]

John Casey updated MNG-2142:
----------------------------

    Fix Version: 2.1

> Forcing execution of the post-integration-test phase
> ----------------------------------------------------
>
>          Key: MNG-2142
>          URL: http://jira.codehaus.org/browse/MNG-2142
>      Project: Maven 2
>         Type: Improvement

>   Components: integration tests
>     Versions: 2.0.3
>     Reporter: Vincent Massol
>      Fix For: 2.1

>
>
> The post-integration-test phase needs to always be called even in case of tests failures in the integration-test phase. 
> For example when using Cargo the container may be left running if the post-integration-test phase is not called...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MNG-2142) Forcing execution of the post-integration-test phase

Posted by "Andrew Williams (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_100850 ] 

Andrew Williams commented on MNG-2142:
--------------------------------------

As I understand it the pre- and post- integration-test phases are for controlling the integration environment, so I think it is vital that the post is called even on failure.

Is there a semantic already that assumes a post- running means success? perhaps pre- and post- whatever should always run for the phase then the lifecycle is defined as a list of phases (exclusing pre- and post-) each of which will invoke a pre- before and a post- after. I believe this would fix another bug I read, though I cannot remember which.

> Forcing execution of the post-integration-test phase
> ----------------------------------------------------
>
>                 Key: MNG-2142
>                 URL: http://jira.codehaus.org/browse/MNG-2142
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: integration tests
>    Affects Versions: 2.0.3
>            Reporter: Vincent Massol
>             Fix For: 2.1.x
>
>
> The post-integration-test phase needs to always be called even in case of tests failures in the integration-test phase. 
> For example when using Cargo the container may be left running if the post-integration-test phase is not called...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MNG-2142) Forcing execution of the post-integration-test phase

Posted by "Federico Fernández (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=151815#action_151815 ] 

ffbeltran edited comment on MNG-2142 at 10/24/08 7:52 AM:
-------------------------------------------------------------------

It's possible to configure the Surefire plugin to continue a build even if it encounters a failure. For example, i have:

        <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
                <executions>
                    <execution>
                        <id>surefire-ut</id>
                        <phase>test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <skip>false</skip>
                            <excludes>
                                <exclude>**/*ITest.java</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>surefire-it</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <skip>false</skip>
                            <includes>
                                <include>**/*ITest.java</include>
                            </includes>
                            <testFailureIgnore>true</testFailureIgnore>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

My Unit Tests ends with Test.java and my Integration Tests ends with ITest.java. With <testFailureIgnore>, when Maven encounters a error in a Integration Test it continue the execution, stopping the server. Hope it helps

      was (Author: ffbeltran):
    It's possible to configure the Surefire plugin to continue a build even if it encounters a failure. For example, i have:

        <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
                <executions>
                    <execution>
                        <id>surefire-ut</id>
                        <phase>test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <skip>false</skip>
                            <excludes>
                                <exclude>**/*ITest.java</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>surefire-it</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <skip>false</skip>
                            <includes>
                                <include>**/*ITest.java</include>
                            </includes>
                            <testFailureIgnore>true</testFailureIgnore>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

My Unit Tests ends with Test.java and my Integration Tests ends with ITest.java. When Maven encounters a error in a Integration Test it continue the execution, stopping the server. Hope it helps
  
> Forcing execution of the post-integration-test phase
> ----------------------------------------------------
>
>                 Key: MNG-2142
>                 URL: http://jira.codehaus.org/browse/MNG-2142
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Integration Tests
>    Affects Versions: 2.0.3
>            Reporter: Vincent Massol
>             Fix For: 3.0
>
>
> The post-integration-test phase needs to always be called even in case of tests failures in the integration-test phase. 
> For example when using Cargo the container may be left running if the post-integration-test phase is not called...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MNG-2142) Forcing execution of the post-integration-test phase

Posted by "Christopher Barrow (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=270189#comment-270189 ] 

Christopher Barrow edited comment on MNG-2142 at 6/11/11 9:40 PM:
------------------------------------------------------------------

We are are hitting this too. Definitely a fix asap would be much appreciated. The workaround
of setting testFailureIgnore to true causes the whole build to appear to succeed which is not generally what one wants when there are test failures. Paul's idea of a flag would be a helpful workaround.

      was (Author: chris.barrow):
    We are are hitting this too. Definitely a fix asap would be much appreciated. The workaround
of setting testFailureIgnore to true causes the whole build to appear to succeed which is not generally what one wants when there are test failures. Paul's idea of a flag would be helpful workaround.
  
> Forcing execution of the post-integration-test phase
> ----------------------------------------------------
>
>                 Key: MNG-2142
>                 URL: http://jira.codehaus.org/browse/MNG-2142
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: Integration Tests
>    Affects Versions: 2.0.3
>            Reporter: Vincent Massol
>             Fix For: Issues to be reviewed for 3.x
>
>
> The post-integration-test phase needs to always be called even in case of tests failures in the integration-test phase. 
> For example when using Cargo the container may be left running if the post-integration-test phase is not called...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2142) Forcing execution of the post-integration-test phase

Posted by "Federico Fernández (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=151815#action_151815 ] 

Federico Fernández commented on MNG-2142:
-----------------------------------------

It's possible to configure the Surefire plugin to continue a build even if it encounters a failure. For example, i have:

        <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
                <executions>
                    <execution>
                        <id>surefire-ut</id>
                        <phase>test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <skip>false</skip>
                            <excludes>
                                <exclude>**/*ITest.java</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>surefire-it</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <skip>false</skip>
                            <includes>
                                <include>**/*ITest.java</include>
                            </includes>
                            <testFailureIgnore>true</testFailureIgnore>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

My Unit Tests ends with Test.java and my Integration Tests ends with ITest.java. When Maven encounters a error in a Integration Test it continue the execution, stopping the server. Hope it helps

> Forcing execution of the post-integration-test phase
> ----------------------------------------------------
>
>                 Key: MNG-2142
>                 URL: http://jira.codehaus.org/browse/MNG-2142
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Integration Tests
>    Affects Versions: 2.0.3
>            Reporter: Vincent Massol
>             Fix For: 3.0
>
>
> The post-integration-test phase needs to always be called even in case of tests failures in the integration-test phase. 
> For example when using Cargo the container may be left running if the post-integration-test phase is not called...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MNG-2142) Forcing execution of the post-integration-test phase

Posted by "Christopher Barrow (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=270190#comment-270190 ] 

Christopher Barrow commented on MNG-2142:
-----------------------------------------

Actually there is a good solution which is to use the failsafe plug-in. This is designed for integration tests and handles this case very well. The test failures are discovered in the verify phase so the post-integration-test phase is always executed. So I would suggest it's not worth fixing this bug.

> Forcing execution of the post-integration-test phase
> ----------------------------------------------------
>
>                 Key: MNG-2142
>                 URL: http://jira.codehaus.org/browse/MNG-2142
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: Integration Tests
>    Affects Versions: 2.0.3
>            Reporter: Vincent Massol
>             Fix For: Issues to be reviewed for 3.x
>
>
> The post-integration-test phase needs to always be called even in case of tests failures in the integration-test phase. 
> For example when using Cargo the container may be left running if the post-integration-test phase is not called...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2142) Forcing execution of the post-integration-test phase

Posted by "Gregor Heine (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=232477#action_232477 ] 

Gregor Heine commented on MNG-2142:
-----------------------------------

Wow, this is a pretty bad flaw. What else is the purpose of a post-integration-test phase if not to do clean up after the integration-test phase, regardless whether the tests passed or not (like e.g. shutting down a cargo container). Any chance this can get fixed before 3.x?

> Forcing execution of the post-integration-test phase
> ----------------------------------------------------
>
>                 Key: MNG-2142
>                 URL: http://jira.codehaus.org/browse/MNG-2142
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: Integration Tests
>    Affects Versions: 2.0.3
>            Reporter: Vincent Massol
>             Fix For: Issues to be reviewed for 3.x
>
>
> The post-integration-test phase needs to always be called even in case of tests failures in the integration-test phase. 
> For example when using Cargo the container may be left running if the post-integration-test phase is not called...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2142) Forcing execution of the post-integration-test phase

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2142?page=comments#action_60661 ] 

Brett Porter commented on MNG-2142:
-----------------------------------

This flies in the face of the current lifecycle design. The only way I see this is being feasible is if we do use the pre/post automated phase wrappers and make their semantics to behave in this way.

The alternative is to not fail from the integration-test goal, but set a property, then fail from the post- phase after everything is done. Sounds hacky though.

> Forcing execution of the post-integration-test phase
> ----------------------------------------------------
>
>          Key: MNG-2142
>          URL: http://jira.codehaus.org/browse/MNG-2142
>      Project: Maven 2
>         Type: Improvement

>   Components: integration tests
>     Versions: 2.0.3
>     Reporter: Vincent Massol

>
>
> The post-integration-test phase needs to always be called even in case of tests failures in the integration-test phase. 
> For example when using Cargo the container may be left running if the post-integration-test phase is not called...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MNG-2142) Forcing execution of the post-integration-test phase

Posted by "Christopher Barrow (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=270189#comment-270189 ] 

Christopher Barrow commented on MNG-2142:
-----------------------------------------

We are are hitting this too. Definitely a fix asap would be much appreciated. The workaround
of setting testFailureIgnore to true causes the whole build to appear to succeed which is not generally what one wants when there are test failures. Paul's idea of a flag would be helpful workaround.

> Forcing execution of the post-integration-test phase
> ----------------------------------------------------
>
>                 Key: MNG-2142
>                 URL: http://jira.codehaus.org/browse/MNG-2142
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: Integration Tests
>    Affects Versions: 2.0.3
>            Reporter: Vincent Massol
>             Fix For: Issues to be reviewed for 3.x
>
>
> The post-integration-test phase needs to always be called even in case of tests failures in the integration-test phase. 
> For example when using Cargo the container may be left running if the post-integration-test phase is not called...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2142) Forcing execution of the post-integration-test phase

Posted by "Paul Benedict (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=232489#action_232489 ] 

Paul Benedict commented on MNG-2142:
------------------------------------

Can a flag be set so plugins can determine whether the post-process phase is being invoked after success or failure?

> Forcing execution of the post-integration-test phase
> ----------------------------------------------------
>
>                 Key: MNG-2142
>                 URL: http://jira.codehaus.org/browse/MNG-2142
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: Integration Tests
>    Affects Versions: 2.0.3
>            Reporter: Vincent Massol
>             Fix For: Issues to be reviewed for 3.x
>
>
> The post-integration-test phase needs to always be called even in case of tests failures in the integration-test phase. 
> For example when using Cargo the container may be left running if the post-integration-test phase is not called...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira