Merge "Patch for setSimCardPower_1_1"
This commit is contained in:
commit
b4e998e812
1 changed files with 10 additions and 10 deletions
|
@ -33,17 +33,17 @@ TEST_F(RadioHidlTest_v1_1, setSimCardPower_1_1) {
|
||||||
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_1->rspInfo.error,
|
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_1->rspInfo.error,
|
||||||
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED,
|
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED,
|
||||||
RadioError::INVALID_ARGUMENTS, RadioError::RADIO_NOT_AVAILABLE}));
|
RadioError::INVALID_ARGUMENTS, RadioError::RADIO_NOT_AVAILABLE}));
|
||||||
/* Wait some time for setting sim power down and then verify it */
|
if (radioRsp_v1_1->rspInfo.error == RadioError::NONE) {
|
||||||
updateSimCardStatus();
|
/* Wait some time for setting sim power down and then verify it */
|
||||||
auto startTime = std::chrono::system_clock::now();
|
updateSimCardStatus();
|
||||||
while (cardStatus.cardState != CardState::ABSENT &&
|
auto startTime = std::chrono::system_clock::now();
|
||||||
|
while (cardStatus.cardState != CardState::ABSENT &&
|
||||||
std::chrono::duration_cast<chrono::seconds>(std::chrono::system_clock::now() - startTime)
|
std::chrono::duration_cast<chrono::seconds>(std::chrono::system_clock::now() - startTime)
|
||||||
.count() < 80) {
|
.count() < 80) {
|
||||||
/* Set 2 seconds as interval to check card status */
|
/* Set 2 seconds as interval to check card status */
|
||||||
sleep(2);
|
sleep(2);
|
||||||
updateSimCardStatus();
|
updateSimCardStatus();
|
||||||
}
|
}
|
||||||
if (radioRsp_v1_1->rspInfo.error == RadioError::NONE) {
|
|
||||||
EXPECT_EQ(CardState::ABSENT, cardStatus.cardState);
|
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) {
|
radioRsp_v1_1->rspInfo.error == RadioError::NONE) {
|
||||||
/* Wait some time for resetting back to sim power on and then verify it */
|
/* Wait some time for resetting back to sim power on and then verify it */
|
||||||
updateSimCardStatus();
|
updateSimCardStatus();
|
||||||
startTime = std::chrono::system_clock::now();
|
auto startTime = std::chrono::system_clock::now();
|
||||||
while (cardStatus.cardState != CardState::PRESENT &&
|
while (cardStatus.cardState != CardState::PRESENT &&
|
||||||
std::chrono::duration_cast<chrono::seconds>(std::chrono::system_clock::now() -
|
std::chrono::duration_cast<chrono::seconds>(std::chrono::system_clock::now() -
|
||||||
startTime)
|
startTime)
|
||||||
|
|
Loading…
Reference in a new issue