alexeyinkin commented on code in PR #25033:
URL: https://github.com/apache/beam/pull/25033#discussion_r1091629989


##########
playground/frontend/integration_test/standalone_cancel_running_example_test.dart:
##########
@@ -49,15 +43,8 @@ void main() {
 
 Future<void> _runAndCancelExample(WidgetTester wt, Duration duration) async {
   await wt.tap(find.runOrCancelButton());
-  try {
-    await wt.pumpAndSettle(
-      const Duration(milliseconds: 100),
-      EnginePhase.sendSemanticsUpdate,
-      duration,
-    );
-  } catch (e) {
-    //ignore
-  }
+
+  await wt.wait(duration);

Review Comment:
   What is the definition of "freeze"?
   
   I believe it is impossible to put the thread to sleep in JavaScript.
   I guess what appears "frozen" is just animations ticking but not ticking or 
ticking but not rendering.
   
   If `pump()` ticks animations once and schedules a render, then for the test 
purpose there technically is no difference between calling it once vs calling 
it in a loop, it's just that with the loop we are visually satisfied with 
smooth animation at the cost of active waiting and complexity. I suggest 
keeping things simple.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to