Merge "Update UsageSetting Cache before comparison in VTS" am: 630637627f am: af9e5f36a9 am: 5227cdb664

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1973539

Change-Id: I4e8da2388b64aaf6504b6f49dc3570da9833a3e9
This commit is contained in:
Nathan Harold
2022-02-07 22:49:29 +00:00
committed by Automerger Merge Worker

View File

@@ -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";
}
}