Fix flaky complex_layout_scroll_perf__memory test (#150287)
Initial tap is missing sometimes; either its never delivered or it is delivered before gesture controller is hooked up. 1: Update the two perf tests to output when TAPPED is received 2: Update the MemoryTest to keep tapping while waiting for TAPPED Tested on devicelab: * setting iterations=1 * removing the timeout before READY * running tests in a while loop Before this change, you could get the test to hang often. After this change you'll see "tapping device... [x]" where x is the counter. Fixes #150096
This commit is contained in:
@@ -26,7 +26,7 @@ Future<void> main() async {
|
||||
final Completer<void> ready = Completer<void>();
|
||||
runApp(GestureDetector(
|
||||
onTap: () {
|
||||
debugPrint('Received tap.');
|
||||
debugPrint('==== MEMORY BENCHMARK ==== TAPPED ====');
|
||||
ready.complete();
|
||||
},
|
||||
behavior: HitTestBehavior.opaque,
|
||||
@@ -35,12 +35,14 @@ Future<void> main() async {
|
||||
),
|
||||
));
|
||||
await SchedulerBinding.instance.endOfFrame;
|
||||
await Future<void>.delayed(const Duration(milliseconds: 50));
|
||||
debugPrint('==== MEMORY BENCHMARK ==== READY ====');
|
||||
|
||||
await ready.future;
|
||||
debugPrint('Continuing...');
|
||||
|
||||
// Wait out any errant taps due to synchronization
|
||||
await Future<void>.delayed(const Duration(milliseconds: 200));
|
||||
|
||||
// remove onTap handler, enable pointer events for app
|
||||
runApp(GestureDetector(
|
||||
child: const IgnorePointer(
|
||||
|
||||
Reference in New Issue
Block a user