You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "George Harp (JIRA)" <ji...@codehaus.org> on 2008/02/01 02:49:57 UTC
[jira] Created: (SUREFIRE-448) @Before, @After, @BeforeClass,
@AfterClass do not seem to be functioning as of 2.4
@Before, @After, @BeforeClass, @AfterClass do not seem to be functioning as of 2.4
----------------------------------------------------------------------------------
Key: SUREFIRE-448
URL: http://jira.codehaus.org/browse/SUREFIRE-448
Project: Maven Surefire
Issue Type: Bug
Components: Junit 4.x support
Affects Versions: 2.4
Environment: Windows XP
maven 2.0.8
Reporter: George Harp
Attachments: WeatherMessageGeneratorCallableTest.java
the attached class only outputs the testOne() message:
--
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: (SUREFIRE-448) @Before, @After, @BeforeClass,
@AfterClass do not seem to be functioning as of 2.4
Posted by "George Harp (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_121981 ]
George Harp commented on SUREFIRE-448:
--------------------------------------
The following output is from eclipse's junit run:
WeatherMessageGeneratorCallableTest beforeClass ERROR >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>1
WeatherMessageGeneratorCallableTest before ERROR >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>1
WeatherMessageGeneratorCallableTest testOne ERROR >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>1
WeatherMessageGeneratorCallableTest after ERROR >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>1
WeatherMessageGeneratorCallableTest afterClass ERROR >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>1
This is from surefire:
WeatherMessageGeneratorCallableTest testOne ERROR >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>1
also if I rename testOne() to not start with the word test it doesnt execute inspite of the annotation
> @Before, @After, @BeforeClass, @AfterClass do not seem to be functioning as of 2.4
> ----------------------------------------------------------------------------------
>
> Key: SUREFIRE-448
> URL: http://jira.codehaus.org/browse/SUREFIRE-448
> Project: Maven Surefire
> Issue Type: Bug
> Components: Junit 4.x support
> Affects Versions: 2.4
> Environment: Windows XP
> maven 2.0.8
> Reporter: George Harp
> Attachments: WeatherMessageGeneratorCallableTest.java
>
>
> the attached class only outputs the testOne() message:
--
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: (SUREFIRE-448) @Before, @After, @BeforeClass,
@AfterClass do not seem to be functioning as of 2.4
Posted by "Dan Fabulich (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Fabulich updated SUREFIRE-448:
----------------------------------
Attachment: surefire448.zip
> @Before, @After, @BeforeClass, @AfterClass do not seem to be functioning as of 2.4
> ----------------------------------------------------------------------------------
>
> Key: SUREFIRE-448
> URL: http://jira.codehaus.org/browse/SUREFIRE-448
> Project: Maven Surefire
> Issue Type: Bug
> Components: Junit 4.x support
> Affects Versions: 2.4
> Environment: Windows XP
> maven 2.0.8
> Reporter: George Harp
> Attachments: surefire448.zip, WeatherMessageGeneratorCallableTest.java, WeatherMessageGeneratorCallableTest.java
>
>
> the attached class only outputs the testOne() message:
--
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: (SUREFIRE-448) @Before, @After, @BeforeClass,
@AfterClass do not seem to be functioning as of 2.4
Posted by "George Harp (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
George Harp updated SUREFIRE-448:
---------------------------------
Attachment: log.txt
The output from mvn clean install -X
> @Before, @After, @BeforeClass, @AfterClass do not seem to be functioning as of 2.4
> ----------------------------------------------------------------------------------
>
> Key: SUREFIRE-448
> URL: http://jira.codehaus.org/browse/SUREFIRE-448
> Project: Maven Surefire
> Issue Type: Bug
> Components: Junit 4.x support
> Affects Versions: 2.4
> Environment: Windows XP
> maven 2.0.8
> Reporter: George Harp
> Attachments: log.txt, surefire448.zip, WeatherMessageGeneratorCallableTest.java, WeatherMessageGeneratorCallableTest.java
>
>
> the attached class only outputs the testOne() message:
--
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] Reopened: (SUREFIRE-448) @Before, @After, @BeforeClass,
@AfterClass do not seem to be functioning as of 2.4
Posted by "George Harp (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
George Harp reopened SUREFIRE-448:
----------------------------------
I ran your test and got the following output:
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Surefire report directory: c:\temp\surefire448\surefire448\target\surefir
e-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running junit4.WeatherMessageGeneratorCallableTest
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>1
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Wed Feb 20 16:55:58 CST 2008
[INFO] Final Memory: 3M/6M
[INFO] ------------------------------------------------------------------------
Only 1 line of output not 5.
I tried maven 2.0.4 and 2.0.8, should I try another version?
PS thanks for the clean example
> @Before, @After, @BeforeClass, @AfterClass do not seem to be functioning as of 2.4
> ----------------------------------------------------------------------------------
>
> Key: SUREFIRE-448
> URL: http://jira.codehaus.org/browse/SUREFIRE-448
> Project: Maven Surefire
> Issue Type: Bug
> Components: Junit 4.x support
> Affects Versions: 2.4
> Environment: Windows XP
> maven 2.0.8
> Reporter: George Harp
> Attachments: surefire448.zip, WeatherMessageGeneratorCallableTest.java, WeatherMessageGeneratorCallableTest.java
>
>
> the attached class only outputs the testOne() message:
--
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: (SUREFIRE-448) @Before, @After, @BeforeClass,
@AfterClass do not seem to be functioning as of 2.4
Posted by "George Harp (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_124623 ]
George Harp commented on SUREFIRE-448:
--------------------------------------
is the sub directory src/test/java/junit4 necessary? Eclipse complains that you cannot nest a source directory under a source directory.
> @Before, @After, @BeforeClass, @AfterClass do not seem to be functioning as of 2.4
> ----------------------------------------------------------------------------------
>
> Key: SUREFIRE-448
> URL: http://jira.codehaus.org/browse/SUREFIRE-448
> Project: Maven Surefire
> Issue Type: Bug
> Components: Junit 4.x support
> Affects Versions: 2.4
> Environment: Windows XP
> maven 2.0.8
> Reporter: George Harp
> Attachments: log.txt, surefire448.zip, WeatherMessageGeneratorCallableTest.java, WeatherMessageGeneratorCallableTest.java
>
>
> the attached class only outputs the testOne() message:
--
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: (SUREFIRE-448) @Before, @After, @BeforeClass,
@AfterClass do not seem to be functioning as of 2.4
Posted by "Dan Fabulich (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Fabulich updated SUREFIRE-448:
----------------------------------
Attachment: surefire448.zip
updated project
> @Before, @After, @BeforeClass, @AfterClass do not seem to be functioning as of 2.4
> ----------------------------------------------------------------------------------
>
> Key: SUREFIRE-448
> URL: http://jira.codehaus.org/browse/SUREFIRE-448
> Project: Maven Surefire
> Issue Type: Bug
> Components: Junit 4.x support
> Affects Versions: 2.4
> Environment: Windows XP
> maven 2.0.8
> Reporter: George Harp
> Attachments: log.txt, surefire448.zip, surefire448.zip, WeatherMessageGeneratorCallableTest.java, WeatherMessageGeneratorCallableTest.java
>
>
> the attached class only outputs the testOne() message:
--
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] Closed: (SUREFIRE-448) @Before, @After, @BeforeClass,
@AfterClass do not seem to be functioning as of 2.4
Posted by "Dan Fabulich (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Fabulich closed SUREFIRE-448.
---------------------------------
Resolution: Cannot Reproduce
I can't reproduce this failure. I attached a sample minimal Maven project that attempts to reproduce the problem; when I run it, I see 5 distinct lines of error output.
> @Before, @After, @BeforeClass, @AfterClass do not seem to be functioning as of 2.4
> ----------------------------------------------------------------------------------
>
> Key: SUREFIRE-448
> URL: http://jira.codehaus.org/browse/SUREFIRE-448
> Project: Maven Surefire
> Issue Type: Bug
> Components: Junit 4.x support
> Affects Versions: 2.4
> Environment: Windows XP
> maven 2.0.8
> Reporter: George Harp
> Attachments: surefire448.zip, WeatherMessageGeneratorCallableTest.java, WeatherMessageGeneratorCallableTest.java
>
>
> the attached class only outputs the testOne() message:
--
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] Closed: (SUREFIRE-448) @Before, @After, @BeforeClass,
@AfterClass do not seem to be functioning as of 2.4
Posted by "Dan Fabulich (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Fabulich closed SUREFIRE-448.
---------------------------------
Resolution: Cannot Reproduce
Your log states that you're not using Surefire 2.4; you're using Surefire 2.2 (maven-surefire-plugin:2.2). I updated the sample project to include an explicit reference to version 2.4.2; I think you'll find that works better for you.
> @Before, @After, @BeforeClass, @AfterClass do not seem to be functioning as of 2.4
> ----------------------------------------------------------------------------------
>
> Key: SUREFIRE-448
> URL: http://jira.codehaus.org/browse/SUREFIRE-448
> Project: Maven Surefire
> Issue Type: Bug
> Components: Junit 4.x support
> Affects Versions: 2.4
> Environment: Windows XP
> maven 2.0.8
> Reporter: George Harp
> Attachments: log.txt, surefire448.zip, surefire448.zip, WeatherMessageGeneratorCallableTest.java, WeatherMessageGeneratorCallableTest.java
>
>
> the attached class only outputs the testOne() message:
--
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: (SUREFIRE-448) @Before, @After, @BeforeClass,
@AfterClass do not seem to be functioning as of 2.4
Posted by "George Harp (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
George Harp updated SUREFIRE-448:
---------------------------------
Attachment: WeatherMessageGeneratorCallableTest.java
removed non relevent import
> @Before, @After, @BeforeClass, @AfterClass do not seem to be functioning as of 2.4
> ----------------------------------------------------------------------------------
>
> Key: SUREFIRE-448
> URL: http://jira.codehaus.org/browse/SUREFIRE-448
> Project: Maven Surefire
> Issue Type: Bug
> Components: Junit 4.x support
> Affects Versions: 2.4
> Environment: Windows XP
> maven 2.0.8
> Reporter: George Harp
> Attachments: WeatherMessageGeneratorCallableTest.java, WeatherMessageGeneratorCallableTest.java
>
>
> the attached class only outputs the testOne() message:
--
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: (SUREFIRE-448) @Before, @After, @BeforeClass,
@AfterClass do not seem to be functioning as of 2.4
Posted by "George Harp (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_124621 ]
George Harp commented on SUREFIRE-448:
--------------------------------------
Ok i ran as you said and I am attaching the output.
I am runing Java 1.5.0_06 on XP Maven 2.0.8
> @Before, @After, @BeforeClass, @AfterClass do not seem to be functioning as of 2.4
> ----------------------------------------------------------------------------------
>
> Key: SUREFIRE-448
> URL: http://jira.codehaus.org/browse/SUREFIRE-448
> Project: Maven Surefire
> Issue Type: Bug
> Components: Junit 4.x support
> Affects Versions: 2.4
> Environment: Windows XP
> maven 2.0.8
> Reporter: George Harp
> Attachments: surefire448.zip, WeatherMessageGeneratorCallableTest.java, WeatherMessageGeneratorCallableTest.java
>
>
> the attached class only outputs the testOne() message:
--
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: (SUREFIRE-448) @Before, @After, @BeforeClass,
@AfterClass do not seem to be functioning as of 2.4
Posted by "Dan Fabulich (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_124549 ]
Dan Fabulich commented on SUREFIRE-448:
---------------------------------------
That's weird. I see:
Running junit4.WeatherMessageGeneratorCallableTest
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>1
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>1
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>1
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>1
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>1
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032 sec
Try my project again with "mvn clean test -X > log.txt" and attach the log file. I'm using Maven 2.0.8 with Java 1.5.0_12 on Windows XP.
> @Before, @After, @BeforeClass, @AfterClass do not seem to be functioning as of 2.4
> ----------------------------------------------------------------------------------
>
> Key: SUREFIRE-448
> URL: http://jira.codehaus.org/browse/SUREFIRE-448
> Project: Maven Surefire
> Issue Type: Bug
> Components: Junit 4.x support
> Affects Versions: 2.4
> Environment: Windows XP
> maven 2.0.8
> Reporter: George Harp
> Attachments: surefire448.zip, WeatherMessageGeneratorCallableTest.java, WeatherMessageGeneratorCallableTest.java
>
>
> the attached class only outputs the testOne() message:
--
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: (SUREFIRE-448) @Before, @After, @BeforeClass,
@AfterClass do not seem to be functioning as of 2.4
Posted by "Oliver Lietz (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=199913#action_199913 ]
Oliver Lietz commented on SUREFIRE-448:
---------------------------------------
please reopen, http://jira.springframework.org/browse/SEDBFO-16
> @Before, @After, @BeforeClass, @AfterClass do not seem to be functioning as of 2.4
> ----------------------------------------------------------------------------------
>
> Key: SUREFIRE-448
> URL: http://jira.codehaus.org/browse/SUREFIRE-448
> Project: Maven Surefire
> Issue Type: Bug
> Components: Junit 4.x support
> Affects Versions: 2.4
> Environment: Windows XP
> maven 2.0.8
> Reporter: George Harp
> Attachments: log.txt, surefire448.zip, surefire448.zip, WeatherMessageGeneratorCallableTest.java, WeatherMessageGeneratorCallableTest.java
>
>
> the attached class only outputs the testOne() message:
--
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