From 9c0acd5dc485e422a4a0e329e77ab31af721efeb Mon Sep 17 00:00:00 2001 From: christian mueller Date: Thu, 29 Mar 2012 17:40:07 +0200 Subject: * [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 on CamDbusWrapper and CAmRoutingSenderAsync * adopted RoutingReceiverAsyncTests to new timers Signed-off-by: christian mueller --- PluginRoutingInterfaceAsync/include/CAmRoutingSenderAsync.h | 1 + PluginRoutingInterfaceAsync/test/CAmRoutingReceiverAsync.cpp | 12 ++++-------- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'PluginRoutingInterfaceAsync') diff --git a/PluginRoutingInterfaceAsync/include/CAmRoutingSenderAsync.h b/PluginRoutingInterfaceAsync/include/CAmRoutingSenderAsync.h index ac78eba..c0da207 100644 --- a/PluginRoutingInterfaceAsync/include/CAmRoutingSenderAsync.h +++ b/PluginRoutingInterfaceAsync/include/CAmRoutingSenderAsync.h @@ -22,6 +22,7 @@ #include "IAmRoutingReceiverShadow.h" #include #include +#include namespace am { diff --git a/PluginRoutingInterfaceAsync/test/CAmRoutingReceiverAsync.cpp b/PluginRoutingInterfaceAsync/test/CAmRoutingReceiverAsync.cpp index 55e706a..13c9806 100644 --- a/PluginRoutingInterfaceAsync/test/CAmRoutingReceiverAsync.cpp +++ b/PluginRoutingInterfaceAsync/test/CAmRoutingReceiverAsync.cpp @@ -79,13 +79,12 @@ void CAmEnvironment::SetUp() timespec t; t.tv_nsec = 0; - t.tv_sec = 2; + t.tv_sec = 1; sh_timerHandle_t handle; - IAmShTimerCallBack *buf = &ptimerCallback; //lets use a timeout so the test will finish - pSocketHandler.addTimer(t, buf, handle, (void*) NULL); + pSocketHandler.addTimer(t, &ptimerCallback, handle, (void*) NULL); pSocketHandler.start_listenting(); } @@ -155,11 +154,8 @@ void CAmEnvironment::timerCallback(sh_timerHandle_t handle, void *userData) { (void) handle; (void) userData; + pSocketHandler.restartTimer(handle); pSocketHandler.stop_listening(); - timespec t; - t.tv_nsec = 0; - t.tv_sec = 2; - pSocketHandler.restartTimer(handle, t); } void CAmRoutingReceiverAsync::TearDown() @@ -410,7 +406,7 @@ TEST_F(CAmRoutingReceiverAsync,connectAbortTooLate) am_sinkID_t sinkID = 1; am_ConnectionFormat_e format = CF_GENIVI_ANALOG; - EXPECT_CALL(pReceiveInterface,ackConnect(_,connectionID,E_OK)).Times(1); + EXPECT_CALL(pReceiveInterface,ackConnect(_,connectionID,E_OK)).Times(2); ASSERT_EQ(E_OK, pRouter->asyncConnect(handle,connectionID,sourceID,sinkID,format)); sleep(3); ASSERT_EQ(E_NON_EXISTENT, pRouter->asyncAbort(handle)); -- cgit v1.2.1