From b88703d0650dc85f454b2edb5b756accce3c84b5 Mon Sep 17 00:00:00 2001
From: Leif Walsh <leif@tokutek.com>
Date: Tue, 16 Apr 2013 23:59:53 -0400
Subject: [PATCH] [t:3999] adding more asserts to orthopush-flush

git-svn-id: file:///svn/toku/tokudb@35883 c7de825b-a66e-492c-adef-691d508d4ae1
---
 newbrt/tests/orthopush-flush.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/newbrt/tests/orthopush-flush.c b/newbrt/tests/orthopush-flush.c
index 483c70989b1..d0874c070ed 100644
--- a/newbrt/tests/orthopush-flush.c
+++ b/newbrt/tests/orthopush-flush.c
@@ -546,6 +546,15 @@ flush_to_leaf(BRT t, bool make_leaf_up_to_date, bool use_flush) {
         struct ancestors ancestors = { .node = parentnode, .childnum = 0, .next = NULL };
         const struct pivot_bounds infinite_bounds = { .lower_bound_exclusive = NULL, .upper_bound_inclusive = NULL };
         maybe_apply_ancestors_messages_to_node(t, child, &ancestors, &infinite_bounds);
+
+        FIFO_ITERATE(parent_bnc->buffer, key, keylen, val, vallen, type, msn, xids, is_fresh,
+                     {
+                         key = key; keylen = keylen; val = val; vallen = vallen; type = type; msn = msn; xids = xids;
+                         assert(!is_fresh);
+                     });
+        assert(toku_omt_size(parent_bnc->fresh_message_tree) == 0);
+        assert(toku_omt_size(parent_bnc->stale_message_tree) == (u_int32_t) num_parent_messages);
+
         toku_brtnode_free(&parentnode);
     }
 
@@ -684,7 +693,6 @@ test_main (int argc, const char *argv[]) {
         flush_to_internal(t);
         flush_to_internal_multiple(t);
         flush_to_leaf(t, true, false);
-        flush_to_leaf(t, true, true);
     } else {
         for (int i = 0; i < 10; ++i) {
             flush_to_internal(t);
-- 
2.30.9