Skip to content

Commit dff55b6

Browse files
authored
Fix missing throw Exception in test for Thread.sleep(). (#5268)
Also, update the sleep to 40s (Forgot to push in the last PR)
1 parent 2b2c8e6 commit dff55b6

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

firebase-perf/e2e-app/src/androidTest/java/com/google/firebase/testing/fireperf/FirebasePerformanceFragmentScreenTracesTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ public void scrollAndCycleThroughAllFragments() throws InterruptedException {
5858

5959
// End Activity screen trace by relaunching the activity to ensure the screen trace is sent.
6060
scenario.launch(FirebasePerfFragmentsActivity.class);
61-
Thread.sleep(30 * 1000);
61+
// Default wait between flushes is 30s.
62+
Thread.sleep(40 * 1000);
6263
}
6364

6465
private void scrollRecyclerViewToEnd(int itemCount, int viewId) {

firebase-perf/e2e-app/src/androidTest/java/com/google/firebase/testing/fireperf/FirebasePerformanceScreenTracesTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class FirebasePerformanceScreenTracesTest {
4040
new ActivityScenarioRule<>(FirebasePerfScreenTracesActivity.class);
4141

4242
@Test
43-
public void scrollRecyclerViewToEnd() {
43+
public void scrollRecyclerViewToEnd() throws Exception {
4444
ActivityScenario scenario = activityRule.getScenario();
4545
int itemCount = FirebasePerfScreenTracesActivity.NUM_LIST_ITEMS;
4646
int currItemCount = 0;
@@ -51,6 +51,7 @@ public void scrollRecyclerViewToEnd() {
5151
}
5252
// End Activity screen trace by switching to another Activity
5353
scenario.launch(FirebasePerfScreenTracesActivity.class);
54-
Thread.sleep(30 * 1000);
54+
// Default wait between flushes is 30s.
55+
Thread.sleep(40 * 1000);
5556
}
5657
}

firebase-perf/e2e-app/src/androidTest/java/com/google/firebase/testing/fireperf/FirebasePerformanceTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public void waitForBothTracesAndNetworkRequestsBatch()
6060
for (Future<?> future : futureList) {
6161
future.get();
6262
}
63-
Thread.sleep(30 * 1000);
63+
// Default wait between flushes is 30s.
64+
Thread.sleep(40 * 1000);
6465
}
6566
}

0 commit comments

Comments
 (0)