Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
Java test wasn't cleaning up after itself.
Browse files Browse the repository at this point in the history
  • Loading branch information
John Kalucki committed Nov 29, 2010
1 parent 3cfe876 commit 1f66812
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/test/java/com/twitter/grabbyhands/JavaTest.java
Expand Up @@ -23,12 +23,20 @@
import java.util.HashMap;
import java.util.List;
import static org.junit.Assert.*;
import org.junit.Test;
import org.junit.*;

public class JavaTest {
protected List<String> servers = Arrays.asList("localhost:22133");
protected String queue = "grabby_javatest";
protected List<String> queues = Arrays.asList(queue);
protected GrabbyHands grabbyHands = null;

@Before @After public void cleanup() {
if (grabbyHands != null) {
grabbyHands.join();
grabbyHands = null;
}
}

@Test public void testCreate() {
Config config = new Config();
Expand Down Expand Up @@ -64,7 +72,7 @@ public class JavaTest {
Config config = new Config();
config.addServers(servers);
config.addQueues(queues);
GrabbyHands grabbyHands = new GrabbyHands(config);
grabbyHands = new GrabbyHands(config);
BlockingQueue<Write> send = grabbyHands.getSendQueue(queue);
BlockingQueue<ByteBuffer> recv = grabbyHands.getRecvQueue(queue);

Expand Down

0 comments on commit 1f66812

Please sign in to comment.