From: <svn...@op...> - 2009-03-27 17:54:07
|
Author: dgollub Date: Fri Mar 27 18:54:00 2009 New Revision: 5362 URL: http://www.opensync.org/changeset/5362 Log: Remove testcase hack to simulate an unclean shutdown of a synchronization. Since this test is designed just to simulate a "stale lock" situtation - it's enough by just faking a "stale lock" without the need of simulating a crash. Thanks to Friedrich for the initial review of this issue. fixes #1066 Modified: trunk/tests/CMakeLists.txt trunk/tests/group-tests/check_lock.c Modified: trunk/tests/CMakeLists.txt ============================================================================== --- trunk/tests/CMakeLists.txt Fri Mar 27 18:28:07 2009 (r5361) +++ trunk/tests/CMakeLists.txt Fri Mar 27 18:54:00 2009 (r5362) @@ -227,7 +227,7 @@ OSYNC_TESTCASE(lock lock_dual_lock) OSYNC_TESTCASE(lock lock_dual_lock2) OSYNC_TESTCASE(lock lock_dual_sync_engine_lock) -OSYNC_TESTCASE_DISABLED(lock lock_dual_sync_engine_unclean "1066" ) +OSYNC_TESTCASE(lock lock_dual_sync_engine_unclean ) IF (NOT WIN32) BUILD_CHECK_TEST( ipc ipc-tests/check_ipc.c ${TEST_TARGET_LIBRARIES} ) Modified: trunk/tests/group-tests/check_lock.c ============================================================================== --- trunk/tests/group-tests/check_lock.c Fri Mar 27 18:28:07 2009 (r5361) +++ trunk/tests/group-tests/check_lock.c Fri Mar 27 18:54:00 2009 (r5362) @@ -179,18 +179,6 @@ osync_engine_set_enginestatus_callback(engine, engine_status, NULL); - /* Quit the engine thread, before free()ing it - * - * We want to simulate a unclean engine exit (so we can't use - * osync_engine_finalize() here), but we don't want the old engine thread to - * be running and stealing the messages going to the second engine. - */ - if (engine->thread) { - osync_thread_stop(engine->thread); - osync_thread_unref(engine->thread); - engine->thread = NULL; - } - osync_engine_finalize(engine, &error); osync_engine_unref(engine); osync_group_unref(group); |