summaryrefslogtreecommitdiff
path: root/AudioManagerCore/test
diff options
context:
space:
mode:
authorChristian Linke <Christian.Linke@bmw.de>2016-08-30 10:40:41 -0700
committerChristian Linke <Christian.Linke@bmw.de>2016-08-30 10:40:41 -0700
commit94158ff5c4d3643acc5b5930e155abaae6d6fb66 (patch)
treeaa83a8e73eed8e7bcc39d82fee8dbe0bdac21792 /AudioManagerCore/test
parent84d0506d308be29b257fd80071d288e229789115 (diff)
downloadaudiomanager-94158ff5c4d3643acc5b5930e155abaae6d6fb66.tar.gz
some test fixes
Change-Id: I22ea9682756dd36f6442241951ec6678f3c3f7ae
Diffstat (limited to 'AudioManagerCore/test')
-rw-r--r--AudioManagerCore/test/AmControlInterfaceTest/CAmControlInterfaceTest.cpp64
1 files changed, 0 insertions, 64 deletions
diff --git a/AudioManagerCore/test/AmControlInterfaceTest/CAmControlInterfaceTest.cpp b/AudioManagerCore/test/AmControlInterfaceTest/CAmControlInterfaceTest.cpp
index 5386192..3e9e728 100644
--- a/AudioManagerCore/test/AmControlInterfaceTest/CAmControlInterfaceTest.cpp
+++ b/AudioManagerCore/test/AmControlInterfaceTest/CAmControlInterfaceTest.cpp
@@ -305,70 +305,6 @@ TEST_F(CAmControlInterfaceTest,ackDisconnect)
ASSERT_EQ(E_NON_EXISTENT, pControlReceiver.disconnect(handle,2));
}
-TEST_F(CAmControlInterfaceTest,ackDisconnectFailAndRetry)
-{
- logInfo("ackDisconnectFailAndRetry test started");
- am_connectionID_t connectionID;
- am_Sink_s sink;
- am_sinkID_t sinkID;
- am_Domain_s domain;
- am_domainID_t domainID;
- am_Source_s source;
- am_sourceID_t sourceID;
- std::vector<am_Connection_s> connectionList;
- std::vector<am_Handle_s> handlesList;
- am_Handle_s handle;
- pCF.createSink(sink);
- pCF.createDomain(domain);
- pCF.createSource(source);
- domain.name = "mock";
- domain.busname = "mock";
- domain.domainID=0;
- sink.sinkID = 2;
- sink.domainID = DYNAMIC_ID_BOUNDARY;
- source.sourceID=2;
-
- //prepare the stage
- ASSERT_EQ(E_OK, pDatabaseHandler.enterDomainDB(domain,domainID));
- ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
- ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(source,sourceID));
-
- //now we first need to connect, we expect a call on the routing interface
- EXPECT_CALL(pMockRoutingInterface,asyncConnect(_,1,2,2,CF_GENIVI_STEREO)).WillOnce(Return(E_OK));
- ASSERT_EQ(E_OK, pControlReceiver.connect(handle,connectionID,CF_GENIVI_STEREO,2,2));
-
- //answer with an ack to insert the connection in the database
- EXPECT_CALL(pMockControlInterface,cbAckConnect(_,E_OK)).Times(1);
- pRoutingReceiver.ackConnect(handle, connectionID, E_OK);
-
- //now we can start to disconnect and expect a call on the routing interface
- EXPECT_CALL(pMockRoutingInterface,asyncDisconnect(_,1)).WillOnce(Return(E_OK));
- ASSERT_EQ(E_OK, pControlReceiver.disconnect(handle,1));
-
- //during the disconnection, the connection is still in the list!
- ASSERT_EQ(E_OK, pDatabaseHandler.getListConnections(connectionList));
- ASSERT_TRUE(!connectionList.empty());
-
- //then we fire the ack and expect a call on the controlInterface
- EXPECT_CALL(pMockControlInterface,cbAckDisconnect(_,E_NON_EXISTENT)).Times(1);
- pRoutingReceiver.ackDisconnect(handle, connectionID+1, E_NON_EXISTENT);
-
- //make sure the handle is gone
- ASSERT_EQ(E_OK, pControlReceiver.getListHandles(handlesList));
- ASSERT_TRUE(handlesList.empty());
-
- //make sure the connection is still there
- ASSERT_EQ(E_OK, pDatabaseHandler.getListConnections(connectionList));
- ASSERT_FALSE(connectionList.empty());
-
- ASSERT_TRUE(pDatabaseHandler.existConnectionID(1));
-
- //Now let's try to disconnect now
- EXPECT_CALL(pMockRoutingInterface,asyncDisconnect(_,1)).WillOnce(Return(E_OK));
- ASSERT_EQ(E_OK, pControlReceiver.disconnect(handle,1));
- logInfo("ackDisconnectFailAndRetry test finished");
-}
-
TEST_F(CAmControlInterfaceTest,setSourceState)
{