update AbstractSerializationsTester to generate 1.0 messages, which omit wasted space after the message body. CUR_VER is left at 0.7 to ensure compatibility.

This commit is contained in:
Jonathan Ellis 2012-03-26 09:41:26 -05:00
parent 56302ceccf
commit 8b23dcaef9
25 changed files with 12 additions and 6 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -33,13 +33,15 @@ import java.util.Map;
public class AbstractSerializationsTester extends CleanupHelper
{
protected static final String CUR_VER = System.getProperty("cassandra.version", "0.7");
protected static final Map<String, Integer> VERSION_MAP = new HashMap<String, Integer> ()
protected static final Map<String, Integer> VERSION_MAP = new HashMap<String, Integer> ()
{{
put("0.7", 1);
put("0.7", 1);
put("1.0", 3);
}};
protected static final boolean EXECUTE_WRITES = new Boolean(System.getProperty("cassandra.test-serialization-writes", "False")).booleanValue();
// TODO ant doesn't pass this -D up to the test, so it's kind of useless
protected static final boolean EXECUTE_WRITES = Boolean.getBoolean("cassandra.test-serialization-writes");
protected final int getVersion()
{
return VERSION_MAP.get(CUR_VER);

View File

@ -29,7 +29,6 @@ public class MessageSerializer implements IVersionedSerializer<Message>
{
public void serialize(Message t, DataOutput dos, int version) throws IOException
{
assert t.getVersion() == version : "internode protocol version mismatch"; // indicates programmer error.
Header.serializer().serialize( t.header_, dos, version);
byte[] bytes = t.getMessageBody();
dos.writeInt(bytes.length);