diff options
| author | Mikhail Romanko <me@blankhex.com> | 2025-08-28 17:53:57 +0300 |
|---|---|---|
| committer | Mikhail Romanko <me@blankhex.com> | 2025-08-28 17:53:57 +0300 |
| commit | a0c92c23981abc667bbdf8e3bbf9f530b1db39e7 (patch) | |
| tree | c2bb511ac1b73b609b6f6bc0ffc5324a92b89053 | |
| parent | 12a00c351543d0e10f242d4c4b6f0127db0cb6a1 (diff) | |
| download | bhlib-a0c92c23981abc667bbdf8e3bbf9f530b1db39e7.tar.gz | |
Fix TestThread Condition test
| -rw-r--r-- | test/src/TestThread.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/src/TestThread.c b/test/src/TestThread.c index e8e9ad0..f2a59c2 100644 --- a/test/src/TestThread.c +++ b/test/src/TestThread.c @@ -50,9 +50,11 @@ BH_UNIT_TEST(Condition) start = time(NULL); BH_VERIFY((condition = BH_ConditionNew()) != NULL); BH_VERIFY((mutex = BH_MutexNew()) != NULL); + BH_VERIFY(BH_MutexLock(mutex) == BH_OK); BH_VERIFY(BH_ConditionWaitFor(condition, mutex, 5000) == BH_TIMEOUT); BH_VERIFY(BH_ConditionSignal(condition) == BH_OK); BH_VERIFY(BH_ConditionBroadcast(condition) == BH_OK); + BH_VERIFY(BH_MutexUnlock(mutex) == BH_OK); BH_VERIFY(time(NULL) - start >= 5); BH_ConditionFree(condition); BH_MutexFree(mutex); |
