MB-22256: Fix intermittent failures in test_duplicate_items_disk 58/73758/3
authorDaniel Owen <owend@couchbase.com>
Thu, 16 Feb 2017 17:39:47 +0000 (17:39 +0000)
committerJim Walker <jim@couchbase.com>
Wed, 22 Feb 2017 10:32:00 +0000 (10:32 +0000)
commitd7e179160929f7649f5c5774620ebbec2af94126
tree99774566026083035f86d8b20fc6399805b57193
parent370f70cdfed5f47c4e5075260026996cf7e2dc58
MB-22256: Fix intermittent failures in test_duplicate_items_disk

The ep_testsuite: test_duplicate_items_disk test occassionally fails
because waiting for the ep_vbucket_del stat to update (from 0 to 1)
times-out.

The reason the stat occasionally does not increase is because the
the vbucket that is undergoing deletion is set back to active before
the deletion is complete.

A side-effect of setting a vbucket to active, is that if the vbucket
does not exist then it is recreated.

This patch moves the setting of the vbucket back to active to after we
have confirmed the deletion has completed (by ensuring the
ep_vbucket_del stat increases).  Thereby removing the race condition.

Change-Id: Ied680c64536862829974fd061a25d317f766bb46
Reviewed-on: http://review.couchbase.org/73758
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>
Reviewed-by: Manu Dhundi <manu@couchbase.com>
tests/ep_testsuite.cc