summaryrefslogtreecommitdiff
path: root/radio
diff options
context:
space:
mode:
authorNathan Harold <nharold@google.com>2022-02-07 23:02:43 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-02-07 23:02:43 +0000
commit2e0754c8d02cd37646b80a8ce3f48037b212097d (patch)
treea2e2a1c0dd1c70b44c80dd3a8dbc46ea0dac3c87 /radio
parent911588a887a3c399030dd56868a86b0e6bc1c007 (diff)
parent8a5ce406f8a778261f591be155e744453d400825 (diff)
Merge "Update UsageSetting Cache before comparison in VTS" am: 630637627f am: af9e5f36a9 am: 5227cdb664 am: 8a5ce406f8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1973539 Change-Id: I901713e998da0f12a9aa00b12ad5106a64d7b4a1
Diffstat (limited to 'radio')
-rw-r--r--radio/aidl/vts/radio_network_test.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/radio/aidl/vts/radio_network_test.cpp b/radio/aidl/vts/radio_network_test.cpp
index 391d63c2b6..e1d508d1d3 100644
--- a/radio/aidl/vts/radio_network_test.cpp
+++ b/radio/aidl/vts/radio_network_test.cpp
@@ -264,11 +264,16 @@ TEST_P(RadioNetworkTest, setUsageSetting) {
[&](int serial) { return radio_network->setUsageSetting(serial, originalSetting); },
{RadioError::NONE});
+ // After resetting the value to its original value, update the local cache, which must
+ // always succeed.
+ invokeAndExpectResponse([&](int serial) { return radio_network->getUsageSetting(serial); },
+ {RadioError::NONE});
+
// Check that indeed the updated setting was set. We do this after resetting to original
// conditions to avoid early-exiting the test and leaving the device in a modified state.
- ASSERT_TRUE(expectedSetting == updatedSetting);
+ EXPECT_EQ(expectedSetting, updatedSetting);
// Check that indeed the original setting was reset.
- ASSERT_TRUE(originalSetting == radioRsp_network->usageSetting);
+ EXPECT_EQ(originalSetting, radioRsp_network->usageSetting);
}
/*
@@ -1728,4 +1733,4 @@ TEST_P(RadioNetworkTest, supplyNetworkDepersonalization) {
RadioError::PASSWORD_INCORRECT, RadioError::SIM_ABSENT, RadioError::SYSTEM_ERR}));
}
LOG(DEBUG) << "supplyNetworkDepersonalization finished";
-} \ No newline at end of file
+}