mirror of https://github.com/apache/cassandra
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:
parent
56302ceccf
commit
8b23dcaef9
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.
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue