Commit b81722ef authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Fix the serialize-test: It was doing read then write, instead of write then read

git-svn-id: file:///svn/tokudb@298 c7de825b-a66e-492c-adef-691d508d4ae1
parent 52509b72
...@@ -32,10 +32,9 @@ void test_serialize(void) { ...@@ -32,10 +32,9 @@ void test_serialize(void) {
r = toku_hash_insert(sn.u.n.htables[1], "x", 2, "xval", 5, BRT_NONE); assert(r==0); r = toku_hash_insert(sn.u.n.htables[1], "x", 2, "xval", 5, BRT_NONE); assert(r==0);
sn.u.n.n_bytes_in_hashtables = 3*(BRT_CMD_OVERHEAD+KEY_VALUE_OVERHEAD+2+5); sn.u.n.n_bytes_in_hashtables = 3*(BRT_CMD_OVERHEAD+KEY_VALUE_OVERHEAD+2+5);
deserialize_brtnode_from(fd, nodesize*20, &dn, nodesize);
r = serialize_brtnode_to(fd, sn.nodesize*20, sn.nodesize, &sn); assert(r==0); r = serialize_brtnode_to(fd, sn.nodesize*20, sn.nodesize, &sn); assert(r==0);
r = deserialize_brtnode_from(fd, nodesize*20, &dn, nodesize);
assert(dn->thisnodename==nodesize*20); assert(dn->thisnodename==nodesize*20);
assert(dn->height == 1); assert(dn->height == 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment