Skip to content

Commit 792fb64

Browse files
authored
Add a 40 second sleep at the end of each Fireperf e2e test to ensure that events are sent before the app exits. (#5262)
This should fix the flaky TAP tests that expect traces to be sent.
1 parent de13c1f commit 792fb64

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ 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);
6162
}
6263

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

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,6 @@ public void scrollRecyclerViewToEnd() {
5151
}
5252
// End Activity screen trace by switching to another Activity
5353
scenario.launch(FirebasePerfScreenTracesActivity.class);
54+
Thread.sleep(30 * 1000);
5455
}
5556
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,6 @@ public void waitForBothTracesAndNetworkRequestsBatch()
6060
for (Future<?> future : futureList) {
6161
future.get();
6262
}
63+
Thread.sleep(30 * 1000);
6364
}
6465
}

0 commit comments

Comments
 (0)