[infinispan-issues] [JBoss JIRA] (ISPN-1953) Ensure that test methods in different test classes use different cluster addresses
Galder ZamarreƱo (JIRA)
jira-events at lists.jboss.org
Wed Mar 28 06:07:47 EDT 2012
[ https://issues.jboss.org/browse/ISPN-1953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Galder ZamarreƱo updated ISPN-1953:
-----------------------------------
Fix Version/s: 5.1.4.CR1
(was: 5.1.3.FINAL)
> Ensure that test methods in different test classes use different cluster addresses
> ----------------------------------------------------------------------------------
>
> Key: ISPN-1953
> URL: https://issues.jboss.org/browse/ISPN-1953
> Project: Infinispan
> Issue Type: Task
> Components: Test Suite
> Affects Versions: 5.1.3.CR1
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Fix For: 5.1.4.CR1
>
>
> TestNG will start a method has a {{@Test(timeout = x)}} annotation in a separate thread. Because of this, we don't have access to the test name and we have to rely on the method name only to provide a unique identifier for the cluster.
> This approach breaks down when we have a test class extending another, as all the test methods in the parent class are now duplicated. E.g. StateTransferClassLoaderFunctionalTest extends StateTransferFunctionalTest, which leads to failures like this in the test suite:
> {noformat}
> Cache at address testSTWithWritingNonTxThread-55146 had 3 members; expecting 2. Members were (testSTWithWritingNonTxThread-55146, testSTWithWritingNonTxThread-61383, testSTWithWritingNonTxThread-7922)
> {noformat}
> The solution is to force the user to provide the name of the test, e.g. by calling a method {{backgroundTestStarted(this)}} at the start of each method with a {{@Test(timeout = x)}} annotation. As a bonus, this will make it easier to search for the logs of such test methods.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list