Merge "Merge "Merge "Merge "Use fix iteration numbers in tuning stress test" into marshmallow-cts-dev am: acb676213a" into nougat-cts-dev am: 57a2ed7106" into nougat-mr1-cts-dev am: f3967b1ebb"
am: 2b214fe27c

Change-Id: I0aba8c0aed2aeeceb14d520738ae76aca7599767
diff --git a/tests/tests/tv/src/android/media/tv/cts/BundledTvInputServiceTest.java b/tests/tests/tv/src/android/media/tv/cts/BundledTvInputServiceTest.java
index 9769175..94b2d14 100644
--- a/tests/tests/tv/src/android/media/tv/cts/BundledTvInputServiceTest.java
+++ b/tests/tests/tv/src/android/media/tv/cts/BundledTvInputServiceTest.java
@@ -157,13 +157,11 @@
         if (!Utils.hasTvInputFramework(getActivity())) {
             return;
         }
-        // On average, the device is expected to have ~ 5 pass-through inputs (HDMI1-4 and
-        // Component) and tuning should be completed within 3 seconds, which gives 15 seconds
-        // for an input. Set 5 minutes of timeout for this test case and try 20 iterations.
-        final int ITERATIONS = 20;
-        for (int i = 0; i < mPassthroughInputList.size() * ITERATIONS; ++i) {
-            final TvInputInfo info =
-                    mPassthroughInputList.get(i % mPassthroughInputList.size());
+        // Tuning should be completed within 3 seconds on average, therefore, we set 100 iterations
+        // here to fit the test case running time in 5 minutes limitation of CTS test cases.
+        final int ITERATIONS = 100;
+        for (int i = 0; i < ITERATIONS; ++i) {
+            final TvInputInfo info = mPassthroughInputList.get(i % mPassthroughInputList.size());
             mCallback.mVideoUnavailableReasonMap.remove(info.getId());
             runTestOnUiThread(new Runnable() {
                 @Override