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) {
|
||||
return header.getDurable();
|
||||
} 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));
|
||||
amqpMessage = (AMQPMessage) message;
|
||||
Assert.assertEquals(AMQPMessage.MessageDataScanningStatus.RELOAD_PERSISTENCE, amqpMessage.getDataScanningStatus());
|
||||
Assert.assertTrue(amqpMessage.isDurable());
|
||||
}
|
||||
|
||||
AmqpClient client = createAmqpClient();
|
||||
|
|
Loading…
Reference in New Issue