[jbosscache-commits] JBoss Cache SVN: r7467 - core/trunk/src/test/java/org/jboss/cache/loader.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Wed Jan 14 10:13:01 EST 2009


Author: manik.surtani at jboss.com
Date: 2009-01-14 10:13:00 -0500 (Wed, 14 Jan 2009)
New Revision: 7467

Modified:
   core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheServerTest.java
Log:
Re-enabled test

Modified: core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheServerTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheServerTest.java	2009-01-14 15:07:34 UTC (rev 7466)
+++ core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheServerTest.java	2009-01-14 15:13:00 UTC (rev 7467)
@@ -3,6 +3,7 @@
 import org.jboss.cache.Cache;
 import org.jboss.cache.CacheSPI;
 import org.jboss.cache.Fqn;
+import org.jboss.cache.UnitTestCacheFactory;
 import org.jboss.cache.config.CacheLoaderConfig;
 import org.jboss.cache.config.Configuration;
 import org.jboss.cache.factories.UnitTestConfigurationFactory;
@@ -10,12 +11,14 @@
 import org.jboss.cache.jmx.CacheJmxWrapper;
 import org.jboss.cache.loader.tcp.TcpCacheServer;
 import org.jboss.cache.util.TestingUtil;
-import static org.testng.AssertJUnit.*;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertNull;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.Test;
 
 import java.net.UnknownHostException;
-import org.jboss.cache.UnitTestCacheFactory;
 
 /**
  * Tests various ways of setting up the TcpCacheServer
@@ -23,11 +26,12 @@
  * @author Brian Stansberry
  * @version $Id$
  */
- at Test(groups = {"functional"}, enabled = false, testName = "loader.TcpCacheServerTest")
-// TODO Re-enable!
+ at Test(groups = {"functional"}, enabled = true, testName = "loader.TcpCacheServerTest")
 public class TcpCacheServerTest
 {
    static TcpCacheServer cache_server = null;
+   private static final String SERVER_IP = "127.0.0.1";
+   private static final int SERVER_PORT = 13131;
 
    private CacheSPI<Object, Object> cache;
    private CacheLoader loader;
@@ -61,7 +65,7 @@
    protected CacheLoaderConfig getCacheLoaderConfig() throws Exception
    {
       return buildSingleCacheLoaderConfig(false, null, "org.jboss.cache.loader.TcpDelegatingCacheLoader",
-            "host=127.0.0.1\nport=12121", false, true, true, false, false);
+            "host=" + SERVER_IP + "\nport=" + SERVER_PORT, false, true, true, false, false);
    }
 
    @AfterMethod(alwaysRun = true)
@@ -85,8 +89,8 @@
    private static void createTcpCacheServer() throws UnknownHostException
    {
       cache_server = new TcpCacheServer();
-      cache_server.setBindAddress("127.0.0.1");
-      cache_server.setPort(12121);
+      cache_server.setBindAddress(SERVER_IP);
+      cache_server.setPort(SERVER_PORT);
    }
 
    private void startTcpCacheServer()




More information about the jbosscache-commits mailing list