FIX: Clean up before running tests - otherwise tests will fail if a previous test did not clean up well. (This fixes test failures in Eclipse where tests are executed in different order than in maven) (#1089)

This commit is contained in:
Roland Praml
2017-08-30 17:44:30 +12:00
committed by Rob Bygrave
parent ff496ad2d3
commit a5bcd49ecb
6 changed files with 34 additions and 1 deletions
@@ -37,6 +37,7 @@ public class TestBatchLazyWithCacheHits extends BaseTestCase {
ServerCacheManager serverCacheManager = Ebean.getDefaultServer().getServerCacheManager();
ServerCache beanCache = serverCacheManager.getBeanCache(UUOne.class);
beanCache.clear();
beanCache.getStatistics(true); // Reset statistics - otherwise other tests will interfere
UUOne b = Ebean.find(UUOne.class, inserted.get(1).getId());
assertNotNull(b);