]
Sanne Grinovero updated ISPN-3078:
----------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
@AfterMethod/alwaysRun and alike are not used correctly
--------------------------------------------------------
Key: ISPN-3078
URL:
https://issues.jboss.org/browse/ISPN-3078
Project: Infinispan
Issue Type: Bug
Components: Test Suite
Affects Versions: 5.3.0.Beta1
Reporter: Mircea Markus
Assignee: Mircea Markus
Fix For: 5.3.0.Beta2
alwaysRun=true makes the invocation of that method to happen even if the test that has
the method is not in the running
group:http://testng.org/javadoc/org/testng/annotations/BeforeMethod.html#...
E.g. if I want to run the "xsite" groups, all the @AfterMethod(alwaysRun=true)
from the "functional" groups are also invoked, most likely causing NPEs as the
resources from this tests haven't been initialised. So unless used for an abstract
test class that would be extended by multiple classes from different groups, I don't
see any point in using "alwaysRun" on neither @BeforeMethod nor on
@AfterMethod.
This is causing the suite to exit:
{quote}
[14:53:10][org.infinispan:infinispan-server-core]
[14:53:10][org.infinispan:infinispan-server-core]
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[14:53:10][org.infinispan:infinispan-server-core] !!!!!! (testng-MarshallingTest) Exiting
because MarshallingTest has NOT shut down all the cache managers it has started !!!!!!!
[14:53:10][org.infinispan:infinispan-server-core] !!!!!! (testng-MarshallingTest) The
still-running cacheManager was created here:
org.infinispan.server.core.AbstractMarshallingTest.setUp(AbstractMarshallingTest.scala:49)
!!!!!!!
[14:53:10][org.infinispan:infinispan-server-core]
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
{quote}
AbstractMarshallingTest.tearDown is always invoked(always=true) so I don't know why
this doesn't get cleaned up. Anyway better to use TestUtil.killCacheManager(..) for
handling this.
http://ci.infinispan.org/viewLog.html?buildId=1005&buildTypeId=bt2&am...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: