Fix serialization test
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/29d5dd03 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/29d5dd03 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/29d5dd03 Branch: refs/heads/trunk Commit: 29d5dd03ae7f6b4741e07ce01014acaca93a6e6e Parents: be21417 Author: Yuki Morishita <yu...@apache.org> Authored: Thu Jan 9 17:06:34 2014 -0600 Committer: Yuki Morishita <yu...@apache.org> Committed: Tue Jan 14 20:23:35 2014 -0600 ---------------------------------------------------------------------- test/data/serialization/2.0/db.Row.bin | Bin 587 -> 0 bytes .../org/apache/cassandra/db/SerializationsTest.java | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/29d5dd03/test/data/serialization/2.0/db.Row.bin ---------------------------------------------------------------------- diff --git a/test/data/serialization/2.0/db.Row.bin b/test/data/serialization/2.0/db.Row.bin deleted file mode 100644 index c699448..0000000 Binary files a/test/data/serialization/2.0/db.Row.bin and /dev/null differ http://git-wip-us.apache.org/repos/asf/cassandra/blob/29d5dd03/test/unit/org/apache/cassandra/db/SerializationsTest.java ---------------------------------------------------------------------- diff --git a/test/unit/org/apache/cassandra/db/SerializationsTest.java b/test/unit/org/apache/cassandra/db/SerializationsTest.java index 2bc1493..68686cb 100644 --- a/test/unit/org/apache/cassandra/db/SerializationsTest.java +++ b/test/unit/org/apache/cassandra/db/SerializationsTest.java @@ -200,8 +200,9 @@ public class SerializationsTest extends AbstractSerializationsTester @Test public void testRowRead() throws IOException { - if (EXECUTE_WRITES) - testRowWrite(); + // Since every table creation generates different CF ID, + // we need to generate file every time + testRowWrite(); DataInputStream in = getInput("db.Row.bin"); assert Row.serializer.deserialize(in, getVersion()) != null; @@ -248,8 +249,7 @@ public class SerializationsTest extends AbstractSerializationsTester public void testMutationRead() throws IOException { // mutation deserialization requires being able to look up the keyspace in the schema, - // so we need to rewrite this each time. We can go back to testing on-disk data - // once we pull RM.keyspace field out. + // so we need to rewrite this each time. plus, CF ID is different for every run. testMutationWrite(); DataInputStream in = getInput("db.RowMutation.bin");