Adding 1s time gap between back-to-back calling setDataThrottling API

Modem has restriction that it can not process back-to-back thermal actions.
Adding 1s delay to prevent unexpected errors.

Bug: 181634712
Test: atest VtsHalRadioV1_6TargetTest -- --test-arg com.android.tradefed.testtype.GTest:native-test-flag:"--gtest_filter=*setDataThrottling/0_slot1"
Change-Id: I70a717cbc3a63d5b1abb4be9d3920d0ee3451b14
This commit is contained in:
Aaron Tsai
2021-04-15 20:27:23 +08:00
parent 40bbe789a4
commit 47e14e567f

View File

@@ -433,6 +433,8 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) {
::android::hardware::radio::V1_6::RadioError::NONE,
::android::hardware::radio::V1_6::RadioError::INVALID_ARGUMENTS}));
}
sleep(1);
serial = GetRandomSerialNumber();
res = radio_v1_6->setDataThrottling(serial, DataThrottlingAction::THROTTLE_ANCHOR_CARRIER,
@@ -453,6 +455,8 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) {
::android::hardware::radio::V1_6::RadioError::NONE,
::android::hardware::radio::V1_6::RadioError::INVALID_ARGUMENTS}));
}
sleep(1);
serial = GetRandomSerialNumber();
res = radio_v1_6->setDataThrottling(serial, DataThrottlingAction::HOLD, 60000);
@@ -473,6 +477,8 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) {
::android::hardware::radio::V1_6::RadioError::NONE,
::android::hardware::radio::V1_6::RadioError::INVALID_ARGUMENTS}));
}
sleep(1);
serial = GetRandomSerialNumber();
res = radio_v1_6->setDataThrottling(serial, DataThrottlingAction::NO_DATA_THROTTLING, 60000);