3 Service::Service (CORBA::ORB_ptr orb
)
5 orb_ (CORBA::ORB::_duplicate (orb
))
10 Service::dump_results ()
12 if (this->test_count_
== 0)
15 "ERROR: no tests were completed!\n"));
20 Service::run_test (Test::Callback_ptr callback
)
23 this->call_are_you_there (callback
);
26 this->call_test_oneway (callback
);
31 "ERROR: There were %d exceptions\n"));
34 /// Increment the number of tests completed
39 callback
->shutdown ();
41 catch (const CORBA::Exception
&)
43 ACE_DEBUG ((LM_ERROR
, "(%P|%t) - Service, client shutdown FAILED\n"));
47 this->orb_
->shutdown (false);
52 Service::call_are_you_there (Test::Callback_ptr callback
)
54 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) - Service, calling are_you_there\n"));
55 const int iterations
= 10;
57 int exception_count
= 0;
58 for (int i
= 0; i
!= iterations
; ++i
)
60 CORBA::String_var outstr
;
61 CORBA::String_out
out_str (outstr
.out ());
64 (void) callback
->are_you_there (out_str
);
66 catch (const CORBA::Exception
&)
71 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) - Service, answer = %C\n", outstr
.in ()));
73 return exception_count
;
77 Service::call_test_oneway (Test::Callback_ptr callback
)
79 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) - Service, calling test_oneway\n"));
80 const int iterations
= 10;
82 int exception_count
= 0;
83 for (int i
= 0; i
!= iterations
; ++i
)
87 (void) callback
->test_oneway ();
89 catch (const CORBA::Exception
&)
94 return exception_count
;