diff options
author | christian mueller <christian.ei.mueller@bmw.de> | 2012-03-29 17:40:07 +0200 |
---|---|---|
committer | christian mueller <christian.ei.mueller@bmw.de> | 2012-03-29 17:40:07 +0200 |
commit | 9c0acd5dc485e422a4a0e329e77ab31af721efeb (patch) | |
tree | a9d6e331c0bc23790f0614f880354946c430b522 /AudioManagerDaemon/test | |
parent | 2566c2aaaf8f43b184a037e227e8bf2c747c7679 (diff) | |
download | audiomanager-9c0acd5dc485e422a4a0e329e77ab31af721efeb.tar.gz |
* [GAM-49] worked in comments to last patches
* changed dlt threadsafeness
* changes on timers in CAmSockethandler
* adopted test of Sockethandler to changes
* add versioning scheme to documentation
* added forgotten #include <map> on CamDbusWrapper and CAmRoutingSenderAsync
* adopted RoutingReceiverAsyncTests to new timers
Signed-off-by: christian mueller <christian.ei.mueller@bmw.de>
Diffstat (limited to 'AudioManagerDaemon/test')
-rw-r--r-- | AudioManagerDaemon/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/AudioManagerDaemon/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp b/AudioManagerDaemon/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp index 19e4772..d6aec07 100644 --- a/AudioManagerDaemon/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp +++ b/AudioManagerDaemon/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp @@ -68,18 +68,18 @@ void am::CAmTimerCb::timer1Callback(sh_timerHandle_t handle, void* userData) timespec timeout; timeout.tv_nsec = 0; timeout.tv_sec = 1; - mSocketHandler->restartTimer(handle,timeout); + mSocketHandler->updateTimer(handle,timeout); } void am::CAmTimerCb::timer2Callback(sh_timerHandle_t handle, void* userData) { (void) handle; (void) userData; - // std::cout << "callback2 called" << std::endl; + std::cout << "callback2 called" << std::endl; timespec timeout; timeout.tv_nsec = 011110000; - timeout.tv_sec = 0; - mSocketHandler->restartTimer(handle,timeout); + timeout.tv_sec = 1; + mSocketHandler->updateTimer(handle,timeout); } void am::CAmTimerCb::timer3Callback(sh_timerHandle_t, void* userData) @@ -117,7 +117,6 @@ void* playWithUnixSocketServer(void* data) TEST(CAmSocketHandlerTest,playWithTimers) { - gDispatchDone = 0; CAmSocketHandler myHandler; CAmTimerCb testCallback(&myHandler); timespec timeoutTime, timeout2, timeout3, timeout4; @@ -129,15 +128,11 @@ TEST(CAmSocketHandlerTest,playWithTimers) timeout3.tv_sec = 3; timeout4.tv_nsec = 0; timeout4.tv_sec = 20; - IAmShTimerCallBack* buf = &testCallback.pTimer1Callback; - IAmShTimerCallBack* buf2 = &testCallback.pTimer2Callback; - IAmShTimerCallBack* buf3 = &testCallback.pTimer3Callback; - IAmShTimerCallBack* buf4 = &testCallback.pTimer4Callback; sh_timerHandle_t handle; - myHandler.addTimer(timeoutTime, buf, handle, NULL); - myHandler.addTimer(timeout2, buf2, handle, NULL); - myHandler.addTimer(timeout3, buf3, handle, NULL); - myHandler.addTimer(timeout4, buf4, handle, NULL); + myHandler.addTimer(timeoutTime, &testCallback.pTimer1Callback, handle, NULL); + myHandler.addTimer(timeout2, &testCallback.pTimer2Callback, handle, NULL); + myHandler.addTimer(timeout3, &testCallback.pTimer3Callback, handle, NULL); + myHandler.addTimer(timeout4, &testCallback.pTimer4Callback, handle, NULL); myHandler.start_listenting(); } |