mirror of https://github.com/apache/activemq.git
apply patch from https://issues.apache.org/jira/browse/AMQ-3067 with thanks and additional test
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1041351 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7d5494258b
commit
78a54c9353
|
@ -60,6 +60,7 @@ public class ActiveMQBlobMessage extends ActiveMQMessage implements BlobMessage
|
|||
copy.setMimeType(getMimeType());
|
||||
copy.setDeletedByBroker(isDeletedByBroker());
|
||||
copy.setBlobUploader(getBlobUploader());
|
||||
copy.setName(getName());
|
||||
}
|
||||
|
||||
public byte getDataStructureType() {
|
||||
|
|
|
@ -50,6 +50,7 @@ public class FTPBlobTest extends FTPTestSupport {
|
|||
MessageProducer producer = session.createProducer(destination);
|
||||
MessageConsumer consumer = session.createConsumer(destination);
|
||||
BlobMessage message = session.createBlobMessage(file);
|
||||
message.setName("fileName");
|
||||
|
||||
producer.send(message);
|
||||
Thread.sleep(1000);
|
||||
|
@ -58,6 +59,7 @@ public class FTPBlobTest extends FTPTestSupport {
|
|||
Message msg = consumer.receive(1000);
|
||||
Assert.assertTrue(msg instanceof ActiveMQBlobMessage);
|
||||
|
||||
assertEquals("name is correct", "fileName", ((ActiveMQBlobMessage)msg).getName());
|
||||
InputStream input = ((ActiveMQBlobMessage) msg).getInputStream();
|
||||
StringBuilder b = new StringBuilder();
|
||||
int i = input.read();
|
||||
|
|
Loading…
Reference in New Issue