summaryrefslogtreecommitdiff
path: root/ACE/tests/Bug_2659_Regression_Test.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2007-10-25 14:46:58 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2007-10-25 14:46:58 +0000
commit28e1ea6681d146e0b31c9a7aa50013887bb3187a (patch)
treef1fddccfbc43ff83f7ed7efe1863c2b2ec21b00e /ACE/tests/Bug_2659_Regression_Test.cpp
parent18f4bd8212f1a4798797a0d8c7011a078dd284cd (diff)
downloadATCD-28e1ea6681d146e0b31c9a7aa50013887bb3187a.tar.gz
Thu Oct 25 14:47:15 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE/tests/Bug_2659_Regression_Test.cpp')
-rw-r--r--ACE/tests/Bug_2659_Regression_Test.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/ACE/tests/Bug_2659_Regression_Test.cpp b/ACE/tests/Bug_2659_Regression_Test.cpp
index 41a41e0b57e..10be56ada27 100644
--- a/ACE/tests/Bug_2659_Regression_Test.cpp
+++ b/ACE/tests/Bug_2659_Regression_Test.cpp
@@ -40,8 +40,9 @@ EntryExit ee (CNAME,MNAME,LOC)
class EntryExit
{
public:
- EntryExit (const ACE_TCHAR* class_name, const ACE_TCHAR *method_name
- , void *location = 0)
+ EntryExit (const ACE_TCHAR* class_name,
+ const ACE_TCHAR *method_name,
+ void *location = 0)
{
class_name_ [20] = method_name_[20] = 0;
@@ -156,14 +157,20 @@ run_main (int, ACE_TCHAR *[])
if (thread_manager->kill_all (SIGUSR1) == -1)
{
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%P|%t) Task signalling failed.\n"))
- , -1);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) Task signalling failed.\n")),
+ -1);
}
- if (reactor_task.wait () == -1) {
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%P|%t) Task wait failed.\n"))
- , -1);
- }
+ // Wait 5 seconds for the other thread to exit, if it didn't exit the
+ // wait return -1 and we return with an error
+ ACE_Time_Value timeout (5);
+ if (thread_manager->wait (&timeout, false, false) == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) Error, task wait failed.\n")),
+ -1);
+ }
ACE_END_TEST;