ARTEMIS-3383 AMQPMessage.isDurable wrongly returns false during persistent lazy reload state
This commit is contained in:
parent
ec508d8306
commit
ee3814dbfd
|
@ -1073,7 +1073,9 @@ public abstract class AMQPMessage extends RefCountMessage implements org.apache.
|
||||||
if (header != null && header .getDurable() != null) {
|
if (header != null && header .getDurable() != null) {
|
||||||
return header.getDurable();
|
return header.getDurable();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
// if header == null and scanninStatus=RELOAD_PERSISTENCE, it means the message can only be durable
|
||||||
|
// even though the parsing hasn't happened yet
|
||||||
|
return getDataScanningStatus() == MessageDataScanningStatus.RELOAD_PERSISTENCE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,7 @@ public class AmqpJournalLoadingTest extends AmqpClientTestSupport {
|
||||||
Assert.assertThat(message, Matchers.instanceOf(AMQPMessage.class));
|
Assert.assertThat(message, Matchers.instanceOf(AMQPMessage.class));
|
||||||
amqpMessage = (AMQPMessage) message;
|
amqpMessage = (AMQPMessage) message;
|
||||||
Assert.assertEquals(AMQPMessage.MessageDataScanningStatus.RELOAD_PERSISTENCE, amqpMessage.getDataScanningStatus());
|
Assert.assertEquals(AMQPMessage.MessageDataScanningStatus.RELOAD_PERSISTENCE, amqpMessage.getDataScanningStatus());
|
||||||
|
Assert.assertTrue(amqpMessage.isDurable());
|
||||||
}
|
}
|
||||||
|
|
||||||
AmqpClient client = createAmqpClient();
|
AmqpClient client = createAmqpClient();
|
||||||
|
|
Loading…
Reference in New Issue