[jboss-cvs] JBossAS SVN: r107331 - in projects/cluster/ha-server-cache-ispn/trunk/src: test/java/org/jboss/web/tomcat/service/session/distributedcache/ispn and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Aug 2 16:18:22 EDT 2010
Author: pferraro
Date: 2010-08-02 16:18:22 -0400 (Mon, 02 Aug 2010)
New Revision: 107331
Modified:
projects/cluster/ha-server-cache-ispn/trunk/src/main/resources/META-INF/services/org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManagerFactory
projects/cluster/ha-server-cache-ispn/trunk/src/test/java/org/jboss/web/tomcat/service/session/distributedcache/ispn/DistributedCacheManagerFactoryTest.java
Log:
Fix class name of DistributedCacheManagerFactory service.
Added service loader test.
Modified: projects/cluster/ha-server-cache-ispn/trunk/src/main/resources/META-INF/services/org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManagerFactory
===================================================================
--- projects/cluster/ha-server-cache-ispn/trunk/src/main/resources/META-INF/services/org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManagerFactory 2010-08-02 20:15:46 UTC (rev 107330)
+++ projects/cluster/ha-server-cache-ispn/trunk/src/main/resources/META-INF/services/org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManagerFactory 2010-08-02 20:18:22 UTC (rev 107331)
@@ -1 +1 @@
-org.jboss.web.tomcat.service.session.distributedcache.ispn.DistributedCacheManager
\ No newline at end of file
+org.jboss.web.tomcat.service.session.distributedcache.ispn.DistributedCacheManagerFactory
\ No newline at end of file
Modified: projects/cluster/ha-server-cache-ispn/trunk/src/test/java/org/jboss/web/tomcat/service/session/distributedcache/ispn/DistributedCacheManagerFactoryTest.java
===================================================================
--- projects/cluster/ha-server-cache-ispn/trunk/src/test/java/org/jboss/web/tomcat/service/session/distributedcache/ispn/DistributedCacheManagerFactoryTest.java 2010-08-02 20:15:46 UTC (rev 107330)
+++ projects/cluster/ha-server-cache-ispn/trunk/src/test/java/org/jboss/web/tomcat/service/session/distributedcache/ispn/DistributedCacheManagerFactoryTest.java 2010-08-02 20:18:22 UTC (rev 107331)
@@ -21,6 +21,7 @@
*/
package org.jboss.web.tomcat.service.session.distributedcache.ispn;
+import java.util.Iterator;
import java.util.ServiceLoader;
import org.easymock.EasyMock;
@@ -84,11 +85,19 @@
EasyMock.reset(this.storageFactory, this.marshallerFactory, this.invoker, this.manager, this.storage, this.marshaller, this.atomicMapFactory);
}
-/*
+
@Test
public void load()
{
- ServiceLoader.load(org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManagerFactory.class);
+ Iterator<org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManagerFactory> factories = ServiceLoader.load(org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManagerFactory.class).iterator();
+
+ Assert.assertTrue(factories.hasNext());
+
+ org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManagerFactory factory = factories.next();
+
+ Assert.assertNotNull(factory);
+ Assert.assertTrue(factory instanceof DistributedCacheManagerFactory);
+
+ Assert.assertFalse(factories.hasNext());
}
-*/
}
More information about the jboss-cvs-commits
mailing list