Details
-
Bug
-
Resolution: Done
-
Minor
-
None
Description
Very much like ISPN-7003, TestNG's TestMethodWorker.invokeAfterClassMethods never sees an empty list of methods in m_classMethodMap. That happens because m_classMethodMap is populated before our ChainMethodInterceptor had a chance to filter the methods (e.g. when a test method has an @InTransactionMode annotation).
Normally this is not a problem because each test has a different name, and the test suite tolerates some leaked managers. But when you run a test like PutForExternalReadTest with -Dtest.infinispan.shortTestName=true, you get this failure:
java.lang.IllegalStateException: Two tests with the same name running in parallel: test at org.infinispan.test.fwk.TestResourceTracker.testStarted(TestResourceTracker.java:88) at org.infinispan.test.AbstractInfinispanTest.testClassStarted(AbstractInfinispanTest.java:115) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84) at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138) at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:175) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:107)