This closes #3386
This commit is contained in:
commit
6d10724d05
|
@ -40,6 +40,7 @@ public class PagedMessageImpl implements PagedMessage {
|
||||||
|
|
||||||
private static final byte NONE = 0;
|
private static final byte NONE = 0;
|
||||||
private static final byte CORE = 1;
|
private static final byte CORE = 1;
|
||||||
|
private static final byte OLD_CORE = -1;
|
||||||
private static final byte NOT_CORE = 2;
|
private static final byte NOT_CORE = 2;
|
||||||
|
|
||||||
public static boolean isLargeMessage(byte encodedValue) {
|
public static boolean isLargeMessage(byte encodedValue) {
|
||||||
|
@ -47,6 +48,7 @@ public class PagedMessageImpl implements PagedMessage {
|
||||||
case LargeMessageType.NONE:
|
case LargeMessageType.NONE:
|
||||||
return false;
|
return false;
|
||||||
case LargeMessageType.CORE:
|
case LargeMessageType.CORE:
|
||||||
|
case LargeMessageType.OLD_CORE:
|
||||||
case LargeMessageType.NOT_CORE:
|
case LargeMessageType.NOT_CORE:
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
|
@ -59,7 +61,8 @@ public class PagedMessageImpl implements PagedMessage {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isCoreLargeMessageType(byte encodedValue) {
|
public static boolean isCoreLargeMessageType(byte encodedValue) {
|
||||||
return encodedValue == LargeMessageType.CORE;
|
return encodedValue == LargeMessageType.CORE ||
|
||||||
|
encodedValue == LargeMessageType.OLD_CORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static byte valueOf(Message message) {
|
public static byte valueOf(Message message) {
|
||||||
|
|
|
@ -110,6 +110,23 @@ public class JournalCompatibilityTest extends VersionedBase {
|
||||||
evaluate(receiverClassloader, "meshTest/sendMessages.groovy", server, receiver, "receiveMessages");
|
evaluate(receiverClassloader, "meshTest/sendMessages.groovy", server, receiver, "receiveMessages");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSendReceivePaging() throws Throwable {
|
||||||
|
setVariable(senderClassloader, "persistent", true);
|
||||||
|
startServer(serverFolder.getRoot(), senderClassloader, "journalTest", null, true);
|
||||||
|
evaluate(senderClassloader, "journalcompatibility/forcepaging.groovy");
|
||||||
|
evaluate(senderClassloader, "meshTest/sendMessages.groovy", server, sender, "sendAckMessages");
|
||||||
|
evaluate(senderClassloader, "journalcompatibility/ispaging.groovy");
|
||||||
|
stopServer(senderClassloader);
|
||||||
|
|
||||||
|
setVariable(receiverClassloader, "persistent", true);
|
||||||
|
startServer(serverFolder.getRoot(), receiverClassloader, "journalTest", null, false);
|
||||||
|
evaluate(receiverClassloader, "journalcompatibility/ispaging.groovy");
|
||||||
|
|
||||||
|
setVariable(receiverClassloader, "latch", null);
|
||||||
|
evaluate(receiverClassloader, "meshTest/sendMessages.groovy", server, receiver, "receiveMessages");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test that the server starts properly using an old journal even though persistent size
|
* Test that the server starts properly using an old journal even though persistent size
|
||||||
* metrics were not originaly stored
|
* metrics were not originaly stored
|
||||||
|
|
Loading…
Reference in New Issue