Merge "Fix setSimCardPower_1_1" into pie-vts-dev

This commit is contained in:
Treehugger Robot 2018-08-14 20:13:47 +00:00 committed by Gerrit Code Review
commit c1db422723

View file

@ -43,7 +43,9 @@ TEST_F(RadioHidlTest_v1_1, setSimCardPower_1_1) {
sleep(2);
updateSimCardStatus();
}
EXPECT_EQ(CardState::ABSENT, cardStatus.cardState);
if (radioRsp_v1_1->rspInfo.error == RadioError::NONE) {
EXPECT_EQ(CardState::ABSENT, cardStatus.cardState);
}
/* Test setSimCardPower power up */
serial = GetRandomSerialNumber();
@ -59,7 +61,8 @@ TEST_F(RadioHidlTest_v1_1, setSimCardPower_1_1) {
* If the sim card status for the testing environment is PRESENT,
* verify if sim status is reset back.
*/
if (cardStateForTest == CardState::PRESENT) {
if (cardStateForTest == CardState::PRESENT &&
radioRsp_v1_1->rspInfo.error == RadioError::NONE) {
/* Wait some time for resetting back to sim power on and then verify it */
updateSimCardStatus();
startTime = std::chrono::system_clock::now();