MB-19929: Fix sporadic failure in 'dcp cursor dropping' test 84/70084/2
authorManu Dhundi <manu@couchbase.com>
Fri, 17 Jun 2016 21:29:26 +0000 (14:29 -0700)
committerDave Rigby <daver@couchbase.com>
Fri, 18 Nov 2016 14:08:55 +0000 (14:08 +0000)
In cursor dropping test the max_size and chk_max_items should be such
that 2 checkpoints are created. The test simulates a case where of
the 2 checkpoints, the DCP cursor from one of them is dropped.

Change-Id: Ieb5c6dfba43bea2f8256fa01104f9ddf83a9781f
Reviewed-on: http://review.couchbase.org/70084
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>
tests/ep_testsuite_dcp.cc

index 6ab679a..d89fe1b 100644 (file)
@@ -2363,7 +2363,7 @@ static test_result test_dcp_cursor_dropping(ENGINE_HANDLE *h,
     /* wait for cursor to be dropped. You need to make sure that there are
        2 checkpoints so that the cursors of one of the checkpoint is dropped.
        For this we need to have correct combination of max_size and
-       chk_max_items (max_size=2000000;chk_max_items=2500 in this case) */
+       chk_max_items (max_size=6291456;chk_max_items=8000 in this case) */
     wait_for_stat_to_be_gte(h, h1, "ep_cursors_dropped", 1);
     dcp_stream_from_producer_conn(h, h1, cookie, opaque,
                                   last_seqno_streamed + 1, num_items);
@@ -2429,7 +2429,7 @@ static test_result test_dcp_cursor_dropping_backfill(ENGINE_HANDLE *h,
     start_persistence(h, h1);
     wait_for_flusher_to_settle(h, h1);
 
-    wait_for_stat_to_be(h, h1, "ep_cursors_dropped", 1);
+    wait_for_stat_to_be_gte(h, h1, "ep_cursors_dropped", 1);
 
     /* Read all the items from the producer. This ensures that the items are
        backfilled correctly after scheduling 2 successive backfills. */
@@ -5698,7 +5698,7 @@ BaseTestCase testsuite_testcases[] = {
                     create at least 1000 items when our residency
                     ratio gets to 90%. See test body for more details. */
                  "cursor_dropping_lower_mark=60;cursor_dropping_upper_mark=70;"
-                 "chk_remover_stime=1;max_size=2000000;chk_max_items=2500",
+                 "chk_remover_stime=1;max_size=6291456;chk_max_items=8000",
                  prepare, cleanup),
         TestCase("test dcp cursor dropping backfill",
                  test_dcp_cursor_dropping_backfill, test_setup, teardown,
@@ -5706,7 +5706,7 @@ BaseTestCase testsuite_testcases[] = {
                   create at least 1000 items when our residency
                   ratio gets to 90%. See test body for more details. */
                  "cursor_dropping_lower_mark=60;cursor_dropping_upper_mark=70;"
-                 "chk_remover_stime=1;max_size=2000000;chk_max_items=2500",
+                 "chk_remover_stime=1;max_size=6291456;chk_max_items=8000",
                  prepare, cleanup),
         TestCase("test dcp value compression",
                  test_dcp_value_compression, test_setup, teardown,