mirror of https://github.com/apache/cassandra
Test fixes for 1.0 message serialization format
This commit is contained in:
parent
959764186a
commit
56302ceccf
|
|
@ -197,7 +197,7 @@ public class DatabaseDescriptor
|
|||
}
|
||||
try
|
||||
{
|
||||
partitioner = FBUtilities.newPartitioner(conf.partitioner);
|
||||
partitioner = FBUtilities.newPartitioner(System.getProperty("cassandra.partitioner", conf.partitioner));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ public class MerkleTree implements Serializable
|
|||
*/
|
||||
public transient Range fullRange;
|
||||
|
||||
// TODO This is broken; Token serialization assumes system partitioner, so if this doesn't match all hell breaks loose
|
||||
private transient IPartitioner partitioner;
|
||||
|
||||
private long maxsize;
|
||||
|
|
|
|||
|
|
@ -40,6 +40,11 @@ import org.apache.cassandra.utils.MerkleTree;
|
|||
|
||||
public class SerializationsTest extends AbstractSerializationsTester
|
||||
{
|
||||
static
|
||||
{
|
||||
System.setProperty("cassandra.partitioner", "RandomPartitioner");
|
||||
}
|
||||
|
||||
private static MessageSerializer messageSerializer = new MessageSerializer();
|
||||
|
||||
public static Range FULL_RANGE = new Range(StorageService.getPartitioner().getMinimumToken(), StorageService.getPartitioner().getMinimumToken());
|
||||
|
|
|
|||
|
|
@ -73,8 +73,9 @@ public class SerializationsTest extends AbstractSerializationsTester
|
|||
@Test
|
||||
public void testLegacyBloomFilterRead() throws IOException
|
||||
{
|
||||
if (EXECUTE_WRITES)
|
||||
testLegacyBloomFilterWrite();
|
||||
// We never write out a new LBF. Copy the data file from 0.7 instead.
|
||||
// if (EXECUTE_WRITES)
|
||||
// testLegacyBloomFilterWrite();
|
||||
|
||||
DataInputStream in = getInput("utils.LegacyBloomFilter.bin");
|
||||
assert LegacyBloomFilter.serializer().deserialize(in) != null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue