Author: tabish
Date: Wed Sep 7 13:19:49 2011
New Revision: 1166164
URL: http://svn.apache.org/viewvc?rev=1166164&view=rev
Log:
Apply patches for https://issues.apache.org/jira/browse/AMQ-3483
Modified:
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DummyPolicyTest.java
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfConsumer.java
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/TemporaryTopicMemoryAllocationTest.java
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubX509Certificate.java
Modified:
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java
URL:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java?rev=1166164&r1=1166163&r2=1166164&view=diff
==============================================================================
---
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java
(original)
+++
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java
Wed Sep 7 13:19:49 2011
@@ -32,7 +32,7 @@ import javax.jms.Session;
import javax.jms.TemporaryQueue;
/**
- *
+ *
*/
public class TempQueueMemoryTest extends EmbeddedBrokerTestSupport {
protected Connection serverConnection;
@@ -46,13 +46,13 @@ public class TempQueueMemoryTest extends
protected boolean clientTransactional = false;
protected int numConsumers = 1;
protected int numProducers = 1;
-
+
public void testConcurrentProducerRequestReply() throws Exception {
numProducers = 10;
testLoadRequestReply();
}
-
+
public void testLoadRequestReply() throws Exception {
for (int i=0; i< numConsumers; i++) {
serverSession.createConsumer(serverDestination).setMessageListener(new
MessageListener() {
@@ -66,24 +66,23 @@ public class TempQueueMemoryTest extends
}
producer.close();
} catch (Exception e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
}
});
}
-
+
class Producer extends Thread {
private int numToSend;
public Producer(int numToSend) {
this.numToSend = numToSend;
}
- public void run() {
+ public void run() {
try {
- Session session =
clientConnection.createSession(clientTransactional,
+ Session session =
clientConnection.createSession(clientTransactional,
clientTransactional ? Session.SESSION_TRANSACTED :
Session.AUTO_ACKNOWLEDGE);
MessageProducer producer =
session.createProducer(serverDestination);
-
+
for (int i =0; i< numToSend; i++) {
TemporaryQueue replyTo =
session.createTemporaryQueue();
MessageConsumer consumer =
session.createConsumer(replyTo);
@@ -105,7 +104,6 @@ public class TempQueueMemoryTest extends
}
}
} catch (JMSException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
}
@@ -115,27 +113,27 @@ public class TempQueueMemoryTest extends
threads.add(new Producer(messagesToSend/numProducers));
}
startAndJoinThreads(threads);
-
+
clientSession.close();
serverSession.close();
clientConnection.close();
serverConnection.close();
-
+
AdvisoryBroker ab = (AdvisoryBroker) broker.getBroker().getAdaptor(
AdvisoryBroker.class);
-
+
///The server destination will be left
assertTrue(ab.getAdvisoryDestinations().size() == 1);
-
+
assertTrue("should be zero but is
"+ab.getAdvisoryConsumers().size(),ab.getAdvisoryConsumers().size() == 0);
assertTrue("should be zero but is
"+ab.getAdvisoryProducers().size(),ab.getAdvisoryProducers().size() == 0);
-
+
RegionBroker rb = (RegionBroker) broker.getBroker().getAdaptor(
RegionBroker.class);
-
-
- //serverDestination +
- assertEquals(6, rb.getDestinationMap().size());
+
+
+ //serverDestination +
+ assertEquals(6, rb.getDestinationMap().size());
}
private void startAndJoinThreads(Vector<Thread> threads) throws Exception {
@@ -159,15 +157,15 @@ public class TempQueueMemoryTest extends
}
protected void tearDown() throws Exception {
-
+
super.tearDown();
serverTransactional = clientTransactional = false;
numConsumers = numProducers = 1;
messagesToSend = 2000;
}
-
+
protected ActiveMQDestination createDestination() {
return new ActiveMQQueue(getClass().getName());
}
-
+
}
Modified:
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java
URL:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java?rev=1166164&r1=1166163&r2=1166164&view=diff
==============================================================================
---
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java
(original)
+++
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java
Wed Sep 7 13:19:49 2011
@@ -38,7 +38,7 @@ import javax.jms.Session;
import javax.jms.TextMessage;
/**
- *
+ *
*/
public abstract class CursorSupport extends CombinationTestSupport {
@@ -124,7 +124,6 @@ public abstract class CursorSupport exte
// using the cursor on the broker
Thread.sleep(50);
} catch (Exception e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
consumerList.add(msg);
@@ -158,7 +157,7 @@ public abstract class CursorSupport exte
assertEquals("This should be the same at pos " + i + " in the
list", sent.getJMSMessageID(), consumed.getJMSMessageID());
}
}
-
+
protected Connection getConsumerConnection(ConnectionFactory fac) throws
JMSException {
Connection connection = fac.createConnection();
connection.setClientID("testConsumer");
Modified:
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DummyPolicyTest.java
URL:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DummyPolicyTest.java?rev=1166164&r1=1166163&r2=1166164&view=diff
==============================================================================
---
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DummyPolicyTest.java
(original)
+++
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DummyPolicyTest.java
Wed Sep 7 13:19:49 2011
@@ -24,7 +24,7 @@ import org.springframework.context.suppo
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
- *
+ *
*/
public class DummyPolicyTest extends SpringTestSupport {
@@ -37,7 +37,6 @@ public class DummyPolicyTest extends Spr
}
protected AbstractApplicationContext createApplicationContext() {
- // TODO Auto-generated method stub
return new
ClassPathXmlApplicationContext("org/apache/activemq/filter/dummyPolicy.xml");
}
Modified:
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java
URL:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java?rev=1166164&r1=1166163&r2=1166164&view=diff
==============================================================================
---
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java
(original)
+++
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java
Wed Sep 7 13:19:49 2011
@@ -69,7 +69,6 @@ public class SimpleNetworkTest extends o
textMsg.setText(payload);
remoteProducer.send(replyTo, textMsg);
} catch (JMSException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
}
@@ -168,8 +167,8 @@ public class SimpleNetworkTest extends o
for (int i = 0; i < MESSAGE_COUNT / 2; i++) {
assertNotNull("message count: " + i, remoteConsumer.receive(2500));
}
- }
-
+ }
+
@Override
protected void setUp() throws Exception {
setAutoFail(true);
Modified:
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java
URL:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java?rev=1166164&r1=1166163&r2=1166164&view=diff
==============================================================================
---
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java
(original)
+++
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java
Wed Sep 7 13:19:49 2011
@@ -104,7 +104,6 @@ public class QueueBridgeTest extends Tes
textMsg.setText(payload);
requestServerProducer.send(replyTo, textMsg);
} catch (JMSException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
}
Modified:
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java
URL:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java?rev=1166164&r1=1166163&r2=1166164&view=diff
==============================================================================
---
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java
(original)
+++
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java
Wed Sep 7 13:19:49 2011
@@ -99,7 +99,6 @@ public class TopicBridgeSpringTest exten
LOG.info("Sending response: " + textMsg);
requestServerProducer.send(replyTo, textMsg);
} catch (JMSException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
}
Modified:
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfConsumer.java
URL:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfConsumer.java?rev=1166164&r1=1166163&r2=1166164&view=diff
==============================================================================
---
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfConsumer.java
(original)
+++
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfConsumer.java
Wed Sep 7 13:19:49 2011
@@ -30,7 +30,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- *
+ *
*/
public class PerfConsumer implements MessageListener {
private static final Logger LOG =
LoggerFactory.getLogger(PerfConsumer.class);
@@ -98,7 +98,6 @@ public class PerfConsumer implements Mes
}
lastMsgId=msg.getJMSMessageID();
} catch (JMSException e1) {
- // TODO Auto-generated catch block
e1.printStackTrace();
}
try {
Modified:
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/TemporaryTopicMemoryAllocationTest.java
URL:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/TemporaryTopicMemoryAllocationTest.java?rev=1166164&r1=1166163&r2=1166164&view=diff
==============================================================================
---
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/TemporaryTopicMemoryAllocationTest.java
(original)
+++
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/TemporaryTopicMemoryAllocationTest.java
Wed Sep 7 13:19:49 2011
@@ -21,12 +21,11 @@ import javax.jms.JMSException;
import javax.jms.Session;
/**
- *
+ *
*/
public class TemporaryTopicMemoryAllocationTest extends MemoryAllocationTest {
public TemporaryTopicMemoryAllocationTest() {
super();
- // TODO Auto-generated constructor stub
}
protected Destination getDestination(Session session) throws JMSException {
Modified:
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubX509Certificate.java
URL:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubX509Certificate.java?rev=1166164&r1=1166163&r2=1166164&view=diff
==============================================================================
---
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubX509Certificate.java
(original)
+++
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubX509Certificate.java
Wed Sep 7 13:19:49 2011
@@ -25,7 +25,7 @@ import java.util.Date;
import java.util.Set;
public class StubX509Certificate extends X509Certificate {
-
+
private final Principal id;
public StubX509Certificate(Principal id) {
@@ -38,129 +38,100 @@ public class StubX509Certificate extends
// --- Stubbed Methods ---
public void checkValidity() {
- // TODO Auto-generated method stub
-
}
public void checkValidity(Date arg0) {
- // TODO Auto-generated method stub
-
}
public int getVersion() {
- // TODO Auto-generated method stub
return 0;
}
public BigInteger getSerialNumber() {
- // TODO Auto-generated method stub
return null;
}
public Principal getIssuerDN() {
- // TODO Auto-generated method stub
return null;
}
public Date getNotBefore() {
- // TODO Auto-generated method stub
return null;
}
public Date getNotAfter() {
- // TODO Auto-generated method stub
return null;
}
public byte[] getTBSCertificate() {
- // TODO Auto-generated method stub
return null;
}
public byte[] getSignature() {
- // TODO Auto-generated method stub
return null;
}
public String getSigAlgName() {
- // TODO Auto-generated method stub
return null;
}
public String getSigAlgOID() {
- // TODO Auto-generated method stub
return null;
}
public byte[] getSigAlgParams() {
- // TODO Auto-generated method stub
return null;
}
public boolean[] getIssuerUniqueID() {
- // TODO Auto-generated method stub
return null;
}
public boolean[] getSubjectUniqueID() {
- // TODO Auto-generated method stub
return null;
}
public boolean[] getKeyUsage() {
- // TODO Auto-generated method stub
return null;
}
public int getBasicConstraints() {
- // TODO Auto-generated method stub
return 0;
}
public byte[] getEncoded() {
- // TODO Auto-generated method stub
return null;
}
public void verify(PublicKey arg0) {
- // TODO Auto-generated method stub
-
}
public void verify(PublicKey arg0, String arg1) {
- // TODO Auto-generated method stub
-
}
public String toString() {
- // TODO Auto-generated method stub
return null;
}
public PublicKey getPublicKey() {
- // TODO Auto-generated method stub
return null;
}
public boolean hasUnsupportedCriticalExtension() {
- // TODO Auto-generated method stub
return false;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public Set getCriticalExtensionOIDs() {
- // TODO Auto-generated method stub
return null;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public Set getNonCriticalExtensionOIDs() {
- // TODO Auto-generated method stub
return null;
}
public byte[] getExtensionValue(String arg0) {
- // TODO Auto-generated method stub
return null;
}