MB-20054: Backport ep-engine_unit_tests from watson to 3.0.x 79/64979/11
authorDave Rigby <daver@couchbase.com>
Thu, 16 Jun 2016 11:19:34 +0000 (12:19 +0100)
committerDave Rigby <daver@couchbase.com>
Thu, 7 Jul 2016 15:59:27 +0000 (15:59 +0000)
commitb77fd62a99f85273a265a0daccc2c9f8d6ddff76
treecab6c86e86b4c0a08aa504a0d9bd3e611dbb9aae
parentdd3b6ae5e919bf51adaf5183fc8f1a076eac5357
MB-20054: Backport ep-engine_unit_tests from watson to 3.0.x

In Watson we have created a set of 'unit' (i.e. class-level) tests for
ep-engine. To assist in backporting bug fixes, and specifically their
unit tests (to demonstrate they are correct), this patch backports the
test infrastructure itself.

Note these tests require GTest, so the CMake changes necessary for it
have also been included.

Tests are a backport from couchbase/watson as of commit feda304.
Modified to handle changes in APIs etc, and to remove tests
which fail on 3.0.x as we never chose to fix them in the 3.0.x
branch.

Change-Id: Iaaf59b0d8d6ba0a2211b630ba00fd837ca01614a
Reviewed-on: http://review.couchbase.org/64979
Well-Formed: buildbot <build@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>
30 files changed:
CMakeLists.txt
src/atomicqueue.h
src/bgfetcher.cc
src/connmap.cc
src/connmap.h
src/dcp-consumer.h
src/dcp-producer.h
src/dcp-stream.h
src/ep.h
src/ep_engine.cc
src/ep_engine.h
src/ep_time.c
src/ep_time.h
src/executorpool.cc
src/executorpool.h
src/executorthread.h
src/fakes/fake_executorpool.h [new file with mode: 0644]
src/flusher.cc
src/memory_tracker.cc
src/tasks.h
tests/mock/mock_dcp_consumer.h [new file with mode: 0644]
tests/mock/mock_dcp_producer.h [new file with mode: 0644]
tests/module_tests/dcp_test.cc [new file with mode: 0644]
tests/module_tests/ep_unit_tests_main.cc [new file with mode: 0644]
tests/module_tests/evp_engine_test.cc [new file with mode: 0644]
tests/module_tests/evp_engine_test.h [new file with mode: 0644]
tests/module_tests/evp_store_single_threaded_test.cc [new file with mode: 0644]
tests/module_tests/evp_store_test.cc [new file with mode: 0644]
tests/module_tests/evp_store_test.h [new file with mode: 0644]
tests/module_tests/stream_test.cc [deleted file]