MB-19360: Init mock server in stream module tests 67/63367/2
authorabhinavdangeti <abhinav@couchbase.com>
Tue, 26 Apr 2016 18:12:11 +0000 (11:12 -0700)
committerChiyoung Seo <chiyoung@couchbase.com>
Wed, 27 Apr 2016 23:50:07 +0000 (23:50 +0000)
This needs to be done so that time_mutex in mock_server
gets initialized to enable crash-free invocations of
mock_get_current_time and mock_time_travel apis.

Change-Id: I06e6469a227df1108892c9616344ff3789c72cb8
Reviewed-on: http://review.couchbase.org/63367
Well-Formed: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Will Gardner <will.gardner@couchbase.com>
tests/module_tests/stream_test.cc

index 57ead25..b25a555 100644 (file)
@@ -68,6 +68,10 @@ static void test_mb17766(const std::string& test_dbname) {
               create_instance(1, get_mock_server_api, &handle),
               "Failed to created ep engine instance");
 
+    // Init mock server to initialize time_mutex used in
+    // mock_get_current_time & mock_time_travel apis.
+    init_mock_server(handle);
+
     EventuallyPersistentEngine* engine =
             reinterpret_cast<EventuallyPersistentEngine*>(handle);
     ObjectRegistry::onSwitchThread(engine);