mirror of https://github.com/apache/activemq.git
Apply patch for https://issues.apache.org/activemq/browse/AMQ-2636
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@937272 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9740fb21a6
commit
9524835224
|
@ -29,11 +29,13 @@ public class QualityOfServiceUtilsTest extends TestCase {
|
|||
*/
|
||||
private int ECN;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
Socket socket = new Socket();
|
||||
ECN = socket.getTrafficClass() & Integer.parseInt("00000011", 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
}
|
||||
|
@ -54,6 +56,14 @@ public class QualityOfServiceUtilsTest extends TestCase {
|
|||
|
||||
public void testValidDiffServNames() {
|
||||
Map<String, Integer> namesToExpected = new HashMap<String, Integer>();
|
||||
namesToExpected.put("CS0", Integer.valueOf("000000", 2));
|
||||
namesToExpected.put("CS1", Integer.valueOf("001000", 2));
|
||||
namesToExpected.put("CS2", Integer.valueOf("010000", 2));
|
||||
namesToExpected.put("CS3", Integer.valueOf("011000", 2));
|
||||
namesToExpected.put("CS4", Integer.valueOf("100000", 2));
|
||||
namesToExpected.put("CS5", Integer.valueOf("101000", 2));
|
||||
namesToExpected.put("CS6", Integer.valueOf("110000", 2));
|
||||
namesToExpected.put("CS7", Integer.valueOf("111000", 2));
|
||||
namesToExpected.put("EF", Integer.valueOf("101110", 2));
|
||||
namesToExpected.put("AF11", Integer.valueOf("001010", 2));
|
||||
namesToExpected.put("AF12", Integer.valueOf("001100", 2));
|
||||
|
|
|
@ -18,9 +18,7 @@ package org.apache.activemq.transport.tcp;
|
|||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.JMSException;
|
||||
|
||||
import junit.framework.Test;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.EmbeddedBrokerTestSupport;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
@ -63,8 +61,9 @@ public class TransportUriTest extends EmbeddedBrokerTestSupport {
|
|||
for (String opt : validIntegerOptions) {
|
||||
testValidOptionsWork(DIFF_SERV + opt, "");
|
||||
}
|
||||
String[] validNameOptions = {"EF", "AF11", "AF12", "AF13", "AF21",
|
||||
"AF22", "AF23", "AF31", "AF32", "AF33", "AF41", "AF42", "AF43"};
|
||||
String[] validNameOptions = { "CS0", "CS1", "CS2", "CS3", "CS4", "CS5", "CS6",
|
||||
"CS7", "EF", "AF11", "AF12","AF13", "AF21", "AF22", "AF23", "AF31",
|
||||
"AF32", "AF33", "AF41", "AF42", "AF43" };
|
||||
for (String opt : validNameOptions) {
|
||||
testValidOptionsWork(DIFF_SERV + opt, "");
|
||||
}
|
||||
|
@ -169,11 +168,13 @@ public class TransportUriTest extends EmbeddedBrokerTestSupport {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
bindAddress = "tcp://localhost:61616";
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
if (connection != null) {
|
||||
try {
|
||||
|
@ -185,6 +186,7 @@ public class TransportUriTest extends EmbeddedBrokerTestSupport {
|
|||
super.tearDown();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BrokerService createBroker() throws Exception {
|
||||
BrokerService answer = new BrokerService();
|
||||
answer.setUseJmx(false);
|
||||
|
|
Loading…
Reference in New Issue