THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
Note: Please see The Green Report for latest recommendations in writing DistributedTests.
Updating Old Client/Server DUnit Test to Use Rules
...
1) change "extends JUnit4DistributedTestCase" to "implements Serializable"
Code Block |
---|
@Category(DistributedTest.class)
@SuppressWarnings("serial")
public class CacheRegionClearStatsDUnitTest implements Serializable {
|
...
4) (optional) remove any other uses of @SuppressWarnings
5) add DistributedTestRule add DistributedRule (and optionally CacheRule and ClientCacheRule)
Code Block |
---|
@Rule public DistributedRule distributedRule = new DistributedRule(); @Rule public CacheRule cacheRule = new CacheRule(); |
...
Code Block |
---|
@Before public void setUp() throws Exception { server1 = getHost(0).getVM(0); client1 = getHost(0).getVM(1); } |
7) delete any lines that instantiate CacheRegionClearStatsDUnitTest
...
14) replace any WaitCriterion with AwailityAwaitility
15) delete any dead code or commented out code
...