Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f25e9963 authored by sqian's avatar sqian
Browse files

Fix setSimCardPower_1_1

If the function isn't executed successfully, do not expect its effect
of cardStatus.

Bug: 111661946
Test: run vts
Change-Id: I952728311b595149b449280e73142f2f82af544d
Merged-In: I952728311b595149b449280e73142f2f82af544d
(cherry picked from commit 93424308)
(cherry picked from commit c02dd256)
parent 9da8a727
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -43,7 +43,9 @@ TEST_F(RadioHidlTest_v1_1, setSimCardPower_1_1) {
        sleep(2);
        updateSimCardStatus();
    }
    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();