Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4CB94904D for ; Mon, 26 Mar 2012 15:57:44 +0000 (UTC) Received: (qmail 57535 invoked by uid 500); 26 Mar 2012 15:57:39 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 57425 invoked by uid 500); 26 Mar 2012 15:57:39 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 56963 invoked by uid 99); 26 Mar 2012 15:57:39 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Mar 2012 15:57:39 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 257A8906D; Mon, 26 Mar 2012 15:57:39 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jbellis@apache.org To: commits@cassandra.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [18/18] git commit: cleanup Message-Id: <20120326155739.257A8906D@tyr.zones.apache.org> Date: Mon, 26 Mar 2012 15:57:39 +0000 (UTC) cleanup Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/95976418 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/95976418 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/95976418 Branch: refs/heads/cassandra-1.1 Commit: 959764186ac64e450d7f5566070da32e1b567146 Parents: 1e18538 Author: Jonathan Ellis Authored: Mon Mar 26 09:59:37 2012 -0500 Committer: Jonathan Ellis Committed: Mon Mar 26 10:51:43 2012 -0500 ---------------------------------------------------------------------- .../cassandra/service/SerializationsTest.java | 16 ++++++-------- 1 files changed, 7 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/95976418/test/unit/org/apache/cassandra/service/SerializationsTest.java ---------------------------------------------------------------------- diff --git a/test/unit/org/apache/cassandra/service/SerializationsTest.java b/test/unit/org/apache/cassandra/service/SerializationsTest.java index 710e0ec..b13bf7f 100644 --- a/test/unit/org/apache/cassandra/service/SerializationsTest.java +++ b/test/unit/org/apache/cassandra/service/SerializationsTest.java @@ -63,20 +63,18 @@ public class SerializationsTest extends AbstractSerializationsTester assert messageSerializer.deserialize(in, getVersion()) != null; in.close(); } - private void testTreeResponseWrite() throws IOException { + // empty validation AntiEntropyService.Validator v0 = new AntiEntropyService.Validator(Statics.req); - IPartitioner part = new RandomPartitioner(); - MerkleTree mt = new MerkleTree(part, FULL_RANGE, MerkleTree.RECOMMENDED_DEPTH, Integer.MAX_VALUE); - List tokens = new ArrayList(); + + // validation with a tree + IPartitioner p = new RandomPartitioner(); + MerkleTree mt = new MerkleTree(p, FULL_RANGE, MerkleTree.RECOMMENDED_DEPTH, Integer.MAX_VALUE); for (int i = 0; i < 10; i++) - { - Token t = part.getRandomToken(); - tokens.add(t); - mt.split(t); - } + mt.split(p.getRandomToken()); AntiEntropyService.Validator v1 = new AntiEntropyService.Validator(Statics.req, mt); + DataOutputStream out = getOutput("service.TreeResponse.bin"); AntiEntropyService.TreeResponseVerbHandler.SERIALIZER.serialize(v0, out, getVersion()); AntiEntropyService.TreeResponseVerbHandler.SERIALIZER.serialize(v1, out, getVersion());