Skip to content

Fix missing throw Exception in test for Thread.sleep(). #5268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public void scrollAndCycleThroughAllFragments() throws InterruptedException {

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

private void scrollRecyclerViewToEnd(int itemCount, int viewId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class FirebasePerformanceScreenTracesTest {
new ActivityScenarioRule<>(FirebasePerfScreenTracesActivity.class);

@Test
public void scrollRecyclerViewToEnd() {
public void scrollRecyclerViewToEnd() throws Exception {
ActivityScenario scenario = activityRule.getScenario();
int itemCount = FirebasePerfScreenTracesActivity.NUM_LIST_ITEMS;
int currItemCount = 0;
Expand All @@ -51,6 +51,7 @@ public void scrollRecyclerViewToEnd() {
}
// End Activity screen trace by switching to another Activity
scenario.launch(FirebasePerfScreenTracesActivity.class);
Thread.sleep(30 * 1000);
// Default wait between flushes is 30s.
Thread.sleep(40 * 1000);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public void waitForBothTracesAndNetworkRequestsBatch()
for (Future<?> future : futureList) {
future.get();
}
Thread.sleep(30 * 1000);
// Default wait between flushes is 30s.
Thread.sleep(40 * 1000);
}
}