summaryrefslogtreecommitdiff
path: root/PluginRoutingInterfaceAsync
diff options
context:
space:
mode:
authorchristian mueller <christian.ei.mueller@bmw.de>2012-03-29 17:40:07 +0200
committerchristian mueller <christian.ei.mueller@bmw.de>2012-03-29 17:40:07 +0200
commit9c0acd5dc485e422a4a0e329e77ab31af721efeb (patch)
treea9d6e331c0bc23790f0614f880354946c430b522 /PluginRoutingInterfaceAsync
parent2566c2aaaf8f43b184a037e227e8bf2c747c7679 (diff)
downloadaudiomanager-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 'PluginRoutingInterfaceAsync')
-rw-r--r--PluginRoutingInterfaceAsync/include/CAmRoutingSenderAsync.h1
-rw-r--r--PluginRoutingInterfaceAsync/test/CAmRoutingReceiverAsync.cpp12
2 files changed, 5 insertions, 8 deletions
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 <semaphore.h>
#include <memory.h>
+#include <map>
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));