Merge "Patch for setSimCardPower_1_1"

This commit is contained in:
Treehugger Robot 2018-08-15 17:50:47 +00:00 committed by Gerrit Code Review
commit b4e998e812

View file

@ -33,17 +33,17 @@ TEST_F(RadioHidlTest_v1_1, setSimCardPower_1_1) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_1->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED,
RadioError::INVALID_ARGUMENTS, RadioError::RADIO_NOT_AVAILABLE}));
/* Wait some time for setting sim power down and then verify it */
updateSimCardStatus();
auto startTime = std::chrono::system_clock::now();
while (cardStatus.cardState != CardState::ABSENT &&
if (radioRsp_v1_1->rspInfo.error == RadioError::NONE) {
/* Wait some time for setting sim power down and then verify it */
updateSimCardStatus();
auto startTime = std::chrono::system_clock::now();
while (cardStatus.cardState != CardState::ABSENT &&
std::chrono::duration_cast<chrono::seconds>(std::chrono::system_clock::now() - startTime)
.count() < 80) {
/* Set 2 seconds as interval to check card status */
sleep(2);
updateSimCardStatus();
}
if (radioRsp_v1_1->rspInfo.error == RadioError::NONE) {
/* Set 2 seconds as interval to check card status */
sleep(2);
updateSimCardStatus();
}
EXPECT_EQ(CardState::ABSENT, cardStatus.cardState);
}
@ -65,7 +65,7 @@ TEST_F(RadioHidlTest_v1_1, setSimCardPower_1_1) {
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();
auto startTime = std::chrono::system_clock::now();
while (cardStatus.cardState != CardState::PRESENT &&
std::chrono::duration_cast<chrono::seconds>(std::chrono::system_clock::now() -
startTime)