You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2010/12/29 12:58:58 UTC

[jira] Created: (SUREFIRE-679) [regression] TestNG suite no longer succeeds, with error "testSetStarting called twice"

[regression] TestNG suite no longer succeeds, with error "testSetStarting called twice"
---------------------------------------------------------------------------------------

                 Key: SUREFIRE-679
                 URL: http://jira.codehaus.org/browse/SUREFIRE-679
             Project: Maven Surefire
          Issue Type: Bug
          Components: TestNG support
    Affects Versions: 2.7.1
            Reporter: Brett Porter


I'm receiving this error in 2.7.1:
"Error while executing forked tests.; nested exception is java.lang.IllegalStateException: testSetStarting called twice"

This did not occur with 2.5 on the same project. It is using TestNG with a suite XML and Cargo + Selenium

You should be able to reproduce it by checking out http://svn.apache.org/repos/asf/archiva/trunk, changing the surefire version in the root POM, and running:
mvn clean install
cd archiva-modules/archiva-web/archiva-webapp-test
mvn clean install

I'll have to come back to investigate the cause later - the project is quite crusty and there may be some misconfiguration also.

-- 
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-679) [regression] TestNG suite no longer succeeds, with error "testSetStarting called twice"

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249882#action_249882 ] 

Brett Porter commented on SUREFIRE-679:
---------------------------------------

after repairing the startup problems, the test suite progresses as normal. The method above that contained a failure has both @BeforeTest and @Parameters (with the former the most likely issue).

I can see if I can come up with a test case soon.

> [regression] TestNG suite no longer succeeds, with error "testSetStarting called twice"
> ---------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-679
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-679
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: TestNG support
>    Affects Versions: 2.7.1
>            Reporter: Brett Porter
>
> I'm receiving this error in 2.7.1:
> "Error while executing forked tests.; nested exception is java.lang.IllegalStateException: testSetStarting called twice"
> This did not occur with 2.5 on the same project. It is using TestNG with a suite XML and Cargo + Selenium
> You should be able to reproduce it by checking out http://svn.apache.org/repos/asf/archiva/trunk, changing the surefire version in the root POM, and running:
> mvn clean install
> cd archiva-modules/archiva-web/archiva-webapp-test
> mvn clean install
> I'll have to come back to investigate the cause later - the project is quite crusty and there may be some misconfiguration also.

-- 
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-679) [regression] TestNG suite no longer succeeds, with error "testSetStarting called twice"

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249885#action_249885 ] 

Brett Porter commented on SUREFIRE-679:
---------------------------------------

further data - the output is mixed up (seems related to SUREFIRE-639).

In TestSuite.txt:

{code}

-------------------------------------------------------------------------------
Test set: TestSuite
-------------------------------------------------------------------------------

Results :

Failed tests: 
  testBuildNumberOfSnapshotArtifact(org.apache.archiva.web.test.BrowseTest)
  testDeleteMetadataProperty(org.apache.archiva.web.test.BrowseTest)
  testMerging(org.apache.archiva.web.test.MergingRepositoriesTest)

Tests run: 123, Failures: 3, Errors: 0, Skipped: 4

ert.java:84)
        at org.testng.Assert.failNotEquals(Assert.java:438)
        at org.testng.Assert.assertTrue(Assert.java:32)
        at org.testng.Assert.assertTrue(Assert.java:42)
        at org.apache.archiva.web.test.BrowseTest.testBuildNumberOfSnapshotArtifact(BrowseTest.java:137)

testDeleteMetadataProperty(org.apache.archiva.web.test.BrowseTest)  Time elapsed: 1.407 sec  <<< FAILURE!
java.lang.AssertionError: 'foo=bar' isn't present. expected:<true> but was:<false>
        at org.testng.Assert.fail(Assert.java:84)
        at org.testng.Assert.failNotEquals(Assert.java:438)
        at org.testng.Assert.assertTrue(Assert.java:32)
        at org.apache.archiva.web.test.parent.AbstractSeleniumTest.assertTextPresent(AbstractSeleniumTest.java:163)
        at org.apache.archiva.web.test.BrowseTest.deleteMetadataProperty(BrowseTest.java:229)
        at org.apache.archiva.web.test.BrowseTest.testDeleteMetadataProperty(BrowseTest.java:170)

testMerging(org.apache.archiva.web.test.MergingRepositoriesTest)  Time elapsed: 3.231 sec  <<< FAILURE!
java.lang.AssertionError: 'No conflicting artifacts' isn't present. expected:<true> but was:<false>
        at org.testng.Assert.fail(Assert.java:84)
        at org.testng.Assert.failNotEquals(Assert.java:438)
        at org.testng.Assert.assertTrue(Assert.java:32)
        at org.apache.archiva.web.test.parent.AbstractSeleniumTest.assertTextPresent(AbstractSeleniumTest.java:163)
        at org.apache.archiva.web.test.MergingRepositoriesTest.testMerging(MergingRepositoriesTest.java:55)
{code}

while the output was:

{code}
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running TestSuite
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error while executing forked tests.; nested exception is java.lang.IllegalStateException: testSetStarting called twice
{code}

Note the partial exception and the overwritten summary in the wrong file.

> [regression] TestNG suite no longer succeeds, with error "testSetStarting called twice"
> ---------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-679
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-679
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: TestNG support
>    Affects Versions: 2.7.1
>            Reporter: Brett Porter
>
> I'm receiving this error in 2.7.1:
> "Error while executing forked tests.; nested exception is java.lang.IllegalStateException: testSetStarting called twice"
> This did not occur with 2.5 on the same project. It is using TestNG with a suite XML and Cargo + Selenium
> You should be able to reproduce it by checking out http://svn.apache.org/repos/asf/archiva/trunk, changing the surefire version in the root POM, and running:
> mvn clean install
> cd archiva-modules/archiva-web/archiva-webapp-test
> mvn clean install
> I'll have to come back to investigate the cause later - the project is quite crusty and there may be some misconfiguration also.

-- 
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-679) [regression] TestNG suite no longer succeeds, with error "testSetStarting called twice"

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Rosenvold closed SUREFIRE-679.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.7.2

Fixed with testcase in r1054391. Bug required TestNG AND redirectTestOutputToFile=true AND non-suite setup (>1 test). It would also cause "Test Set Starting" to be printed twice. It is not related to SUREFIRE-639.

I am getting initializeArchiva(org.apache.archiva.web.test.ArchivaAdminTest) failing now, which I suspect is totally different. You may want to re-test your use-case.

> [regression] TestNG suite no longer succeeds, with error "testSetStarting called twice"
> ---------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-679
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-679
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: TestNG support
>    Affects Versions: 2.7.1
>            Reporter: Brett Porter
>            Assignee: Kristian Rosenvold
>             Fix For: 2.7.2
>
>
> I'm receiving this error in 2.7.1:
> "Error while executing forked tests.; nested exception is java.lang.IllegalStateException: testSetStarting called twice"
> This did not occur with 2.5 on the same project. It is using TestNG with a suite XML and Cargo + Selenium
> You should be able to reproduce it by checking out http://svn.apache.org/repos/asf/archiva/trunk, changing the surefire version in the root POM, and running:
> mvn clean install
> cd archiva-modules/archiva-web/archiva-webapp-test
> mvn clean install
> I'll have to come back to investigate the cause later - the project is quite crusty and there may be some misconfiguration also.

-- 
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: (SUREFIRE-679) [regression] TestNG suite no longer succeeds, with error "testSetStarting called twice"

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249882#action_249882 ] 

Brett Porter edited comment on SUREFIRE-679 at 12/29/10 8:04 AM:
-----------------------------------------------------------------

after repairing the startup problems, the test suite progresses as normal. However, at the end the same error appears, so it seems it's not related to the initializeArchiva method.

I can see if I can come up with a test case soon.

      was (Author: brettporter):
    after repairing the startup problems, the test suite progresses as normal. The method above that contained a failure has both @BeforeTest and @Parameters (with the former the most likely issue).

I can see if I can come up with a test case soon.
  
> [regression] TestNG suite no longer succeeds, with error "testSetStarting called twice"
> ---------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-679
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-679
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: TestNG support
>    Affects Versions: 2.7.1
>            Reporter: Brett Porter
>
> I'm receiving this error in 2.7.1:
> "Error while executing forked tests.; nested exception is java.lang.IllegalStateException: testSetStarting called twice"
> This did not occur with 2.5 on the same project. It is using TestNG with a suite XML and Cargo + Selenium
> You should be able to reproduce it by checking out http://svn.apache.org/repos/asf/archiva/trunk, changing the surefire version in the root POM, and running:
> mvn clean install
> cd archiva-modules/archiva-web/archiva-webapp-test
> mvn clean install
> I'll have to come back to investigate the cause later - the project is quite crusty and there may be some misconfiguration also.

-- 
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-679) [regression] TestNG suite no longer succeeds, with error "testSetStarting called twice"

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249878#action_249878 ] 

Brett Porter commented on SUREFIRE-679:
---------------------------------------

I should point out that this was at a point in time where initializeArchiva(org.apache.archiva.web.test.ArchivaAdminTest) was failing (causing all other tests to be skipped). I'll re-verify whether 2.7.1 works once the test suite is passing correctly.

> [regression] TestNG suite no longer succeeds, with error "testSetStarting called twice"
> ---------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-679
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-679
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: TestNG support
>    Affects Versions: 2.7.1
>            Reporter: Brett Porter
>
> I'm receiving this error in 2.7.1:
> "Error while executing forked tests.; nested exception is java.lang.IllegalStateException: testSetStarting called twice"
> This did not occur with 2.5 on the same project. It is using TestNG with a suite XML and Cargo + Selenium
> You should be able to reproduce it by checking out http://svn.apache.org/repos/asf/archiva/trunk, changing the surefire version in the root POM, and running:
> mvn clean install
> cd archiva-modules/archiva-web/archiva-webapp-test
> mvn clean install
> I'll have to come back to investigate the cause later - the project is quite crusty and there may be some misconfiguration also.

-- 
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