Fixed tests for glib mutex and condition variable testing.
authorJon A. Cruz <jonc@osg.samsung.com>
Thu, 23 Apr 2015 07:35:33 +0000 (00:35 -0700)
committerErich Keane <erich.keane@intel.com>
Fri, 24 Apr 2015 16:22:28 +0000 (16:22 +0000)
commit5e38e9b32db167c420e98266fe7209c687f9738c
tree3c785350f282b5d8b0fc067e0641cef361239d5c
parentf5013eb93a1a47083947191d5d891bfe5f2ac9ac
Fixed tests for glib mutex and condition variable testing.

Re-enabled tests that had previously been disabled due to taking too
long.

Removed sleep() calls from test code and replaced with combinations of
usleep() and volatile bools. Since condition variables are being tested
we did not want to use them in the validation process.

Retained debug printf statements, but added #define to turn them
off by default.

On one test system these changes moved the unit test from taking 24
seconds down to only 1.8 seconds.

Change-Id: I9b654a623f3aab9398b6f3aaa2366ab0fcdeb876
Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/818
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-by: Charlie Lenahan <charlie.lenahan@intel.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
resource/csdk/connectivity/test/camutex_tests.cpp