Relax BitmapTest.testDrawingHardwareBitmapNotLeaking
File descriptor count with Vulkan takes more iterations to ramp up.
File descriptor count fluctuate by less than 10, but more than 5.
Bug: 128931269
Bug: 128652499
Test: Ran this test
Merged-In: Ifb1e44bdb2201859532e9b6cd340ff9209046d04
Change-Id: Ifb1e44bdb2201859532e9b6cd340ff9209046d04
diff --git a/tests/tests/graphics/src/android/graphics/cts/BitmapTest.java b/tests/tests/graphics/src/android/graphics/cts/BitmapTest.java
index d1a8526..c90e76b 100644
--- a/tests/tests/graphics/src/android/graphics/cts/BitmapTest.java
+++ b/tests/tests/graphics/src/android/graphics/cts/BitmapTest.java
@@ -1524,7 +1524,7 @@
if (i % 100 == 5) {
assertNotLeaking(i, meminfoStart, meminfoEnd);
final int curFdCount = getFdCount();
- if (curFdCount - fdCount > 5) {
+ if (curFdCount - fdCount > 10) {
fail(String.format("FDs leaked. Expected=%d, current=%d, iteration=%d",
fdCount, curFdCount, i));
}
@@ -1532,7 +1532,10 @@
test.run();
}
assertNotLeaking(2000, meminfoStart, meminfoEnd);
- assertEquals(fdCount, getFdCount());
+ final int curFdCount = getFdCount();
+ if (curFdCount - fdCount > 10) {
+ fail(String.format("FDs leaked. Expected=%d, current=%d", fdCount, curFdCount));
+ }
}
@Test