summaryrefslogtreecommitdiff
path: root/qpid/java/systests
diff options
context:
space:
mode:
authorAndrew Donald Kennedy <grkvlt@apache.org>2010-08-01 14:20:14 +0000
committerAndrew Donald Kennedy <grkvlt@apache.org>2010-08-01 14:20:14 +0000
commite2f26a346d21578025c1b27ddbc837bfe452b193 (patch)
treefb9edb86b20151e79bab0a3a651027b8f8411b0b /qpid/java/systests
parent6c2bc6bc603376dd859ab47611eb9aa647a37dd9 (diff)
downloadqpid-python-e2f26a346d21578025c1b27ddbc837bfe452b193.tar.gz
QPID-2744: Unify 0-10 and 0-8 error messages for invalid object types in properties
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@981231 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/systests')
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java
index 7e029a862f..830421a01f 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java
@@ -55,6 +55,7 @@ public class JMSPropertiesTest extends QpidBrokerTestCase
public static final int JMS_DELIV_MODE = 1;
public static final String JMS_TYPE = "test.jms.type";
protected static final String NULL_OBJECT_PROPERTY = "NullObject";
+ protected static final String INVALID_OBJECT_PROPERTY = "InvalidObject";
protected void setUp() throws Exception
{
@@ -100,8 +101,18 @@ public class JMSPropertiesTest extends QpidBrokerTestCase
catch (MessageFormatException mfe)
{
// Check the error message
- assertEquals("Incorrect error message",
- isBroker010() ? "Object is null" : "Only Primitives objects allowed Object is:null", mfe.getMessage());
+ assertEquals("Incorrect error message", AMQPInvalidClassException.INVALID_OBJECT_MSG + "null", mfe.getMessage());
+ }
+
+ try
+ {
+ sentMsg.setObjectProperty(INVALID_OBJECT_PROPERTY, new Exception());
+ fail("Non primitive Object Property value set");
+ }
+ catch (MessageFormatException mfe)
+ {
+ // Check the error message
+ assertEquals("Incorrect error message: " + mfe.getMessage(), AMQPInvalidClassException.INVALID_OBJECT_MSG + Exception.class, mfe.getMessage());
}
// send it