ARTEMIS-3677 add test, etc.
This commit is contained in:
parent
d2e31a6b3f
commit
7b25cbb51d
|
@ -1410,7 +1410,7 @@ public class CoreMessage extends RefCountMessage implements ICoreMessage {
|
|||
rc.put(CompositeDataConstants.TEXT_BODY, "[compressed]");
|
||||
} else {
|
||||
SimpleString text = m.getReadOnlyBodyBuffer().readNullableSimpleString();
|
||||
rc.put(CompositeDataConstants.TEXT_BODY, text != null ? JsonUtil.truncate(text.toString(), valueSizeLimit) : "");
|
||||
rc.put(CompositeDataConstants.TEXT_BODY, JsonUtil.truncate(text != null ? text.toString() : text, valueSizeLimit));
|
||||
}
|
||||
} else {
|
||||
rc.put(CompositeDataConstants.TEXT_BODY, "[large message]");
|
||||
|
|
|
@ -3729,6 +3729,26 @@ public class QueueControlTest extends ManagementTestBase {
|
|||
session.deleteQueue(queue);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBrowseWithNullPropertyValue() throws Exception {
|
||||
SimpleString address = RandomUtil.randomSimpleString();
|
||||
SimpleString queue = RandomUtil.randomSimpleString();
|
||||
|
||||
session.createQueue(new QueueConfiguration(queue).setAddress(address).setDurable(durable));
|
||||
|
||||
ClientProducer producer = session.createProducer(address);
|
||||
ClientMessage m = session.createMessage(true);
|
||||
m.putStringProperty(RandomUtil.randomString(), null);
|
||||
producer.send(m);
|
||||
producer.close();
|
||||
|
||||
QueueControl queueControl = createManagementControl(address, queue);
|
||||
|
||||
assertEquals(1, queueControl.browse().length);
|
||||
|
||||
session.deleteQueue(queue);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testResetGroups() throws Exception {
|
||||
SimpleString address = RandomUtil.randomSimpleString();
|
||||
|
|
Loading…
Reference in New Issue