Decrease flaky test rate for BinderTest#BandwidthSetGlobalAlert
It is caused by that FW calls bandwidthSetGlobalAlert during
test running.
Enlarge the testAlertBytes size to decrease flaky rate.
Fail log:
05-26 18:27:28.476 817 817 I netd : bandwidthSetGlobalAlert(2097149) <0.31ms> <-- called by test
05-26 18:27:28.492 817 817 I netd : bandwidthSetGlobalAlert(2097152) <0.45ms> <-- called by FW
05-26 18:27:28.494 817 817 I netd : bandwidthSetGlobalAlert(2097152) <0.45ms> <-- called by test
system/netd/tests/binder_test.cpp:1496: Failure
Expected: (quotaBytes) >= (std::stol(Trim(result))), actual: 2097149 vs 2097152
Bug: 133818065
Test: cd system/netd && atest
Change-Id: I4f016d88b1f521af739b2e13c433fe911a1ba602
diff --git a/tests/binder_test.cpp b/tests/binder_test.cpp
index 65a0934..cb915d3 100644
--- a/tests/binder_test.cpp
+++ b/tests/binder_test.cpp
@@ -1627,13 +1627,13 @@
}
TEST_F(BinderTest, BandwidthSetGlobalAlert) {
- long testAlertBytes = 2097149;
+ int64_t testAlertBytes = 2097200;
binder::Status status = mNetd->bandwidthSetGlobalAlert(testAlertBytes);
EXPECT_TRUE(status.isOk()) << status.exceptionMessage();
expectBandwidthGlobalAlertRuleExists(testAlertBytes);
- testAlertBytes = 2097152;
+ testAlertBytes = 2098230;
status = mNetd->bandwidthSetGlobalAlert(testAlertBytes);
EXPECT_TRUE(status.isOk()) << status.exceptionMessage();
expectBandwidthGlobalAlertRuleExists(testAlertBytes);