[infinispan-commits] Infinispan SVN: r971 - in trunk/core/src/test/java/org/infinispan: test and 1 other directory.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Mon Oct 19 12:08:55 EDT 2009
Author: galder.zamarreno at jboss.com
Date: 2009-10-19 12:08:54 -0400 (Mon, 19 Oct 2009)
New Revision: 971
Modified:
trunk/core/src/test/java/org/infinispan/jndi/BindingTest.java
trunk/core/src/test/java/org/infinispan/test/SingleCacheManagerTest.java
Log:
[ISPN-153] (Test that Infinispan Cache and CacheManager instances can be bound to JNDI) Removed preCreate() method since it's not needed. Subclasses can simply annotate their method as @BeforeClass and it will be executed before SingleCacheManagerTest.createBeforeClass().
Modified: trunk/core/src/test/java/org/infinispan/jndi/BindingTest.java
===================================================================
--- trunk/core/src/test/java/org/infinispan/jndi/BindingTest.java 2009-10-19 15:53:34 UTC (rev 970)
+++ trunk/core/src/test/java/org/infinispan/jndi/BindingTest.java 2009-10-19 16:08:54 UTC (rev 971)
@@ -52,9 +52,8 @@
private SingletonNamingServer namingServer;
private Properties props;
- @Override
@BeforeClass
- public void preCreate() throws Exception {
+ public void startJndiServer() throws Exception {
// Create an in-memory jndi
namingServer = new SingletonNamingServer();
namingMain = new Main();
@@ -67,7 +66,7 @@
}
@AfterClass
- public void stopNaming() throws Exception {
+ public void stopJndiServer() throws Exception {
namingServer.destroy();
namingMain.stop();
}
Modified: trunk/core/src/test/java/org/infinispan/test/SingleCacheManagerTest.java
===================================================================
--- trunk/core/src/test/java/org/infinispan/test/SingleCacheManagerTest.java 2009-10-19 15:53:34 UTC (rev 970)
+++ trunk/core/src/test/java/org/infinispan/test/SingleCacheManagerTest.java 2009-10-19 16:08:54 UTC (rev 971)
@@ -22,21 +22,7 @@
protected CacheManager cacheManager;
protected Cache cache;
- /**
- * This method will always be called before {@link #createBeforeClass()}. If you override this, make sure you
- * annotate the overridden method with {@link org.testng.annotations.BeforeClass}.
- *
- * @throws Exception Just in case
- */
- @BeforeClass
- public void preCreate() throws Exception {
- // no op, made for overriding.
- }
-
- // Due to some weirdness with TestNG, it always appends the package and class name to the method names
- // provided on dependsOnMethods unless it thinks there already is a package. This does accept regular expressions
- // though so .*. works. Otherwise it won't detect overridden methods in subclasses.
- @BeforeClass(dependsOnMethods = "org.infinispan.*.preCreate")
+ @BeforeClass()
protected void createBeforeClass() throws Exception {
if (cleanup == CleanupPhase.AFTER_TEST) cacheManager = createCacheManager();
}
More information about the infinispan-commits
mailing list