[infinispan-commits] Infinispan SVN: r2043 - in branches/4.1.x/client/hotrod-client/src: test/java/org/infinispan/client/hotrod and 1 other directory.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Thu Jul 15 19:02:24 EDT 2010
Author: manik.surtani at jboss.com
Date: 2010-07-15 19:02:23 -0400 (Thu, 15 Jul 2010)
New Revision: 2043
Modified:
branches/4.1.x/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/RemoteCacheManagerTest.java
Log:
[ISPN-534] (Standardise keys used for System properties, .properties and Properties entries) Fixed regression
Modified: branches/4.1.x/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
===================================================================
--- branches/4.1.x/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java 2010-07-15 22:56:34 UTC (rev 2042)
+++ branches/4.1.x/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java 2010-07-15 23:02:23 UTC (rev 2043)
@@ -124,7 +124,7 @@
public static final String HOTROD_CLIENT_PROPERTIES = "hotrod-client.properties";
- private ConfigurationProperties config;
+ ConfigurationProperties config;
private TransportFactory transportFactory;
private Marshaller marshaller;
private boolean started = false;
@@ -258,7 +258,6 @@
this(config, true);
}
-
public <K, V> RemoteCache<K, V> getCache(String cacheName) {
return getCache(cacheName, forceReturnValueDefault);
}
Modified: branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/RemoteCacheManagerTest.java
===================================================================
--- branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/RemoteCacheManagerTest.java 2010-07-15 22:56:34 UTC (rev 2042)
+++ branches/4.1.x/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/RemoteCacheManagerTest.java 2010-07-15 23:02:23 UTC (rev 2043)
@@ -1,5 +1,6 @@
package org.infinispan.client.hotrod;
+import org.infinispan.client.hotrod.impl.ConfigurationProperties;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.server.hotrod.HotRodServer;
import org.infinispan.test.SingleCacheManagerTest;
@@ -19,11 +20,13 @@
EmbeddedCacheManager cacheManager = null;
HotRodServer hotrodServer = null;
+ int port;
@Override
protected EmbeddedCacheManager createCacheManager() throws Exception {
cacheManager = TestCacheManagerFactory.createLocalCacheManager();
hotrodServer = TestHelper.startHotRodServer(cacheManager);
+ port = hotrodServer.getPort();
return cacheManager;
}
@@ -49,34 +52,31 @@
remoteCacheManager.start();
remoteCacheManager.stop();
}
-
- public void testUrlConstructor() throws Exception {
- URL resource = Thread.currentThread().getContextClassLoader().getResource("empty-config.properties");
- assert resource != null;
- RemoteCacheManager remoteCacheManager = new RemoteCacheManager(resource);
- assertWorks(remoteCacheManager);
- remoteCacheManager.stop();
- }
public void testUrlAndBooleanConstructor() throws Exception {
URL resource = Thread.currentThread().getContextClassLoader().getResource("empty-config.properties");
assert resource != null;
RemoteCacheManager remoteCacheManager = new RemoteCacheManager(resource, false);
assert !remoteCacheManager.isStarted();
+ remoteCacheManager.config.getProperties().setProperty(ConfigurationProperties.SERVER_LIST, "127.0.0.1:" + port);
remoteCacheManager.start();
assertWorks(remoteCacheManager);
remoteCacheManager.stop();
}
public void testPropertiesConstructor() {
- RemoteCacheManager remoteCacheManager = new RemoteCacheManager(new Properties());
+ Properties p = new Properties();
+ p.setProperty(ConfigurationProperties.SERVER_LIST, "127.0.0.1:" + port);
+ RemoteCacheManager remoteCacheManager = new RemoteCacheManager(p);
assert remoteCacheManager.isStarted();
assertWorks(remoteCacheManager);
remoteCacheManager.stop();
}
public void testPropertiesAndBooleanConstructor() {
- RemoteCacheManager remoteCacheManager = new RemoteCacheManager(new Properties(), false);
+ Properties p = new Properties();
+ p.setProperty(ConfigurationProperties.SERVER_LIST, "127.0.0.1:" + port);
+ RemoteCacheManager remoteCacheManager = new RemoteCacheManager(p, false);
assert !remoteCacheManager.isStarted();
remoteCacheManager.start();
assertWorks(remoteCacheManager);
More information about the infinispan-commits
mailing list