Example #1
0
 def test_rev_pair_get_delta_p(self):
     inputs = [ "21;b17f572;5400077;~contrib/hadoop-store-builder/src/java/voldemort/store/readonly/checksum/MD5CheckSum.java;1;0;voldemort.client.CachingStoreClientFactoryTest;1;1;1", "21;b17f572;5400077;~contrib/hadoop-store-builder/src/java/voldemort/store/readonly/checksum/MD5CheckSum.java;1;0;voldemort.server.EndToEndTest;1;1;0", "32;b17f572;5400077;~contrib/hadoop-store-builder/src/java/voldemort/store/readonly/checksum/CheckSum.java,~contrib/hadoop-store-builder/src/java/voldemort/store/readonly/checksum/Adler32CheckSum.java,~contrib/hadoop-store-builder/src/java/voldemort/store/readonly/checksum/CRC32CheckSum.java;1;0;voldemort.client.CachingStoreClientFactoryTest;1;1;1", "32;b17f572;5400077;~contrib/hadoop-store-builder/src/java/voldemort/store/readonly/checksum/CheckSum.java,~contrib/hadoop-store-builder/src/java/voldemort/store/readonly/checksum/Adler32CheckSum.java,~contrib/hadoop-store-builder/src/java/voldemort/store/readonly/checksum/CRC32CheckSum.java;1;0;voldemort.server.EndToEndTest;1;1;0" ]
     in_lines = self.make_lines(inputs)
     data = pre_process.build_rev_pair( "5400077", "b17f572", in_lines )
     deltas = [pre_process.Delta("5400077;b17f572;Mcontrib/hadoop-store-builder/src/java/voldemort/store/readonly/checksum/MD5CheckSum.java,Mcontrib/hadoop-store-builder/src/java/voldemort/store/readonly/checksum/CheckSum.java,Mcontrib/hadoop-store-builder/src/java/voldemort/store/readonly/checksum/Adler32CheckSum.java,Mcontrib/hadoop-store-builder/src/java/voldemort/store/readonly/checksum/CRC32CheckSum.java" )]
     self.assertEqual( 4, len(pre_process.get_delta( deltas, "5400077", "b17f572").totalDelta ) )
     self.assertEqual( 1, len(data.get_delta_p()) )
     self.assertEqual( 32, data.get_delta_p()[0].mixID )
Example #2
0
 def test_get_delta(self):
     deltas = pre_process.read_deltas("delta_test.input")
     delta = pre_process.get_delta(deltas, "a37abfb", "d3867bf")
     self.assertEqual( "src/java/voldemort/store/readonly/JsonStoreBuilder.java", delta.totalDelta[0].fileName)
     delta = pre_process.get_delta( deltas, "516bc3a", "xxx")
     self.assertIsNone( delta )