You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ke...@apache.org on 2014/01/21 10:58:16 UTC
git commit: Updated to JUnit4,
which seems to have fixed intermittent failures. See AMQ-4980
Updated Branches:
refs/heads/trunk a50f01127 -> d29bab50e
Updated to JUnit4, which seems to have fixed intermittent failures. See AMQ-4980
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/d29bab50
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/d29bab50
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/d29bab50
Branch: refs/heads/trunk
Commit: d29bab50e5f110f677f041c4f3602dc3ce5d76d4
Parents: a50f011
Author: Kevin Earls <ke...@kevinearls.com>
Authored: Tue Jan 21 10:58:00 2014 +0100
Committer: Kevin Earls <ke...@kevinearls.com>
Committed: Tue Jan 21 10:58:00 2014 +0100
----------------------------------------------------------------------
.../usecases/MessageGroupLateArrivalsTest.java | 27 ++++++++++----------
1 file changed, 13 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq/blob/d29bab50/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/MessageGroupLateArrivalsTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/MessageGroupLateArrivalsTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/MessageGroupLateArrivalsTest.java
index 53655e4..7a9b410 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/MessageGroupLateArrivalsTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/MessageGroupLateArrivalsTest.java
@@ -31,8 +31,6 @@ import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Session;
-import junit.framework.Test;
-
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.JmsTestSupport;
import org.apache.activemq.broker.BrokerService;
@@ -40,10 +38,18 @@ import org.apache.activemq.broker.TransportConnector;
import org.apache.activemq.broker.region.policy.PolicyEntry;
import org.apache.activemq.broker.region.policy.PolicyMap;
import org.apache.activemq.command.ActiveMQQueue;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.BlockJUnit4ClassRunner;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class MessageGroupLateArrivalsTest extends JmsTestSupport {
+import static org.junit.Assert.*;
+
+@RunWith(BlockJUnit4ClassRunner.class)
+public class MessageGroupLateArrivalsTest {
public static final Logger log = LoggerFactory.getLogger(MessageGroupLateArrivalsTest.class);
protected Connection connection;
protected Session session;
@@ -56,15 +62,7 @@ public class MessageGroupLateArrivalsTest extends JmsTestSupport {
protected HashMap<String, Integer> messageCount = new HashMap<String, Integer>();
protected HashMap<String, Set<String>> messageGroups = new HashMap<String, Set<String>>();
- public static Test suite() {
- return suite(MessageGroupLateArrivalsTest.class);
- }
-
- public static void main(String[] args) {
- junit.textui.TestRunner.run(suite());
- }
-
- @Override
+ @Before
public void setUp() throws Exception {
broker = createBroker();
broker.start();
@@ -76,7 +74,6 @@ public class MessageGroupLateArrivalsTest extends JmsTestSupport {
connection.start();
}
- @Override
protected BrokerService createBroker() throws Exception {
BrokerService service = new BrokerService();
service.setPersistent(false);
@@ -92,7 +89,7 @@ public class MessageGroupLateArrivalsTest extends JmsTestSupport {
return service;
}
- @Override
+ @After
public void tearDown() throws Exception {
producer.close();
session.close();
@@ -100,6 +97,7 @@ public class MessageGroupLateArrivalsTest extends JmsTestSupport {
broker.stop();
}
+ @Test(timeout = 30 * 1000)
public void testConsumersLateToThePartyGetSomeNewGroups() throws Exception {
final int perBatch = 3;
@@ -164,6 +162,7 @@ public class MessageGroupLateArrivalsTest extends JmsTestSupport {
}
}
+ @Test(timeout = 30 * 1000)
public void testConsumerLateToBigPartyGetsNewGroup() throws Exception {
final int perBatch = 2;