use of org.apache.qpid.server.protocol.converter.MessageConversionException in project qpid-broker-j by apache.
the class PropertyConverter_1_0_to_0_8Test method testToConversionWhenExchangeLengthExceeds255.
public void testToConversionWhenExchangeLengthExceeds255() {
final String testExchange = generateLongString();
final String testRoutingKey = "testRoutingKey";
String to = testExchange + "/" + testRoutingKey;
Properties properties = new Properties();
properties.setTo(to);
Message_1_0 message = createTestMessage(properties);
try {
_messageConverter.convert(message, _namedAddressSpace);
fail("Exception is not thrown");
} catch (MessageConversionException e) {
// pass
}
}
use of org.apache.qpid.server.protocol.converter.MessageConversionException in project qpid-broker-j by apache.
the class PropertyConverter_1_0_to_0_8Test method testSubjectConversionWhenSubjectExceeds255.
public void testSubjectConversionWhenSubjectExceeds255() {
final String subject = generateLongString();
Properties properties = new Properties();
properties.setSubject(subject);
Message_1_0 message = createTestMessage(properties);
try {
_messageConverter.convert(message, _namedAddressSpace);
fail("Expected conversion exception");
} catch (MessageConversionException e) {
// pass
}
}
use of org.apache.qpid.server.protocol.converter.MessageConversionException in project qpid-broker-j by apache.
the class PropertyConverter_1_0_to_0_8Test method testCorrelationIdLongStringConversion.
public void testCorrelationIdLongStringConversion() {
final String correlationId = generateLongString();
Properties properties = new Properties();
properties.setCorrelationId(correlationId);
Message_1_0 message = createTestMessage(properties);
try {
_messageConverter.convert(message, _namedAddressSpace);
fail("Expected exception not thrown");
} catch (MessageConversionException e) {
// pass
}
}
use of org.apache.qpid.server.protocol.converter.MessageConversionException in project qpid-broker-j by apache.
the class PropertyConverter_1_0_to_0_8Test method testApplicationPropertiesConversionWhenKeyLengthExceeds255.
public void testApplicationPropertiesConversionWhenKeyLengthExceeds255() {
Map<String, Object> properties = Collections.singletonMap("testProperty-" + generateLongString(), "testValue");
ApplicationProperties applicationProperties = new ApplicationProperties(properties);
Message_1_0 message = createTestMessage(applicationProperties);
try {
_messageConverter.convert(message, _namedAddressSpace);
fail("Exception is expected");
} catch (MessageConversionException e) {
// pass
}
}
use of org.apache.qpid.server.protocol.converter.MessageConversionException in project qpid-broker-j by apache.
the class PropertyConverter_0_10_to_1_0Test method testHeaderWithListValueConversionFails.
public void testHeaderWithListValueConversionFails() {
Map<String, Object> headers = Collections.singletonMap("listHeader", Collections.emptyList());
final MessageProperties messageProperties = new MessageProperties();
messageProperties.setApplicationHeaders(headers);
MessageTransferMessage message = createTestMessage(messageProperties);
try {
_messageConverter.convert(message, _namedAddressSpace);
fail("Exception is expected");
} catch (MessageConversionException e) {
// pass
}
}
Aggregations