You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bs...@apache.org on 2015/09/04 23:13:24 UTC
[2/3] incubator-geode git commit: GEODE-77 changed this test to use
annotations per Jason's recommendation
GEODE-77 changed this test to use annotations per Jason's recommendation
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/e21dc11e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/e21dc11e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/e21dc11e
Branch: refs/heads/feature/GEODE-77
Commit: e21dc11e95b1d58c43cc7ad5463174ae4d730caa
Parents: c43d045
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Fri Sep 4 14:09:47 2015 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Fri Sep 4 14:09:47 2015 -0700
----------------------------------------------------------------------
.../internal/tcpserver/TcpServerJUnitTest.java | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e21dc11e/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerJUnitTest.java
index f6c5b20..77bd004 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerJUnitTest.java
@@ -13,21 +13,22 @@ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import junit.framework.Assert;
-import junit.framework.TestCase;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
import com.gemstone.gemfire.DataSerializable;
import com.gemstone.gemfire.cache.GemFireCache;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.PoolStatHelper;
import com.gemstone.gemfire.distributed.internal.SharedConfiguration;
-import com.gemstone.gemfire.distributed.internal.tcpserver.TcpClient;
-import com.gemstone.gemfire.distributed.internal.tcpserver.TcpHandler;
-import com.gemstone.gemfire.distributed.internal.tcpserver.TcpServer;
import com.gemstone.gemfire.internal.AvailablePort;
//import com.gemstone.org.jgroups.stack.GossipClient;
//import com.gemstone.org.jgroups.stack.IpAddress;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
-public class TcpServerJUnitTest extends TestCase {
+@Category(UnitTest.class)
+public class TcpServerJUnitTest {
protected/*GemStoneAddition*/ InetAddress localhost;
protected/*GemStoneAddition*/ int port;
@@ -43,7 +44,7 @@ public class TcpServerJUnitTest extends TestCase {
server.start();
}
-
+ @Test
public void test() throws UnknownHostException, IOException, ClassNotFoundException, InterruptedException {
EchoHandler handler = new EchoHandler();
start(handler);
@@ -71,6 +72,7 @@ public class TcpServerJUnitTest extends TestCase {
}
+ @Test
public void testConcurrency() throws UnknownHostException, IOException, ClassNotFoundException, InterruptedException {
CountDownLatch latch = new CountDownLatch(1);
DelayHandler handler = new DelayHandler(latch);