Skip to content

Conversation

@sensuikan1973
Copy link
Contributor

@sensuikan1973 sensuikan1973 commented Apr 30, 2019

Description

FlutterDriver method's timeout is unexpected, I think.
example : waitFor, waitForAbsent, tap and so on.

If I pass timeout argument less than 5 seconds (ex: 3 seconds), I expect waitFor method times out in 3 seconds. But, waitFor mathod times out in 5 seconds.

→ I changed the behavior. So, now, the behavior matches document.

Related Issues

Tests

I added the test to ensure that custom timeout works.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I updated/added relevant documentation (doc comments with ///).
  • [] All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (Please read Handling breaking changes). Replace this with a link to the e-mail where you asked for input on this proposed change.
  • No, this is not a breaking change.

@sensuikan1973
Copy link
Contributor Author

@Hixie Would you review this ?

@goderbauer goderbauer added the framework flutter/packages/flutter repository. See also f: labels. label Apr 30, 2019
@sensuikan1973 sensuikan1973 force-pushed the fix_driver_waitFor_timeout branch from eb84d1c to df82b89 Compare April 30, 2019 09:40
@sensuikan1973 sensuikan1973 changed the title fix FlutterDriver waitFor timeout fix FlutterDriver timeout Apr 30, 2019
@Hixie
Copy link
Contributor

Hixie commented Apr 30, 2019

We should add a test for this. Otherwise someone might change this back and not realise it was intentional.

@sensuikan1973
Copy link
Contributor Author

sensuikan1973 commented May 1, 2019

@Hixie
I added the test.

  • ensure default timeout works
  • ensure custom timeout works

@Piinks Piinks added the t: flutter driver "flutter driver", flutter_drive, or a driver test label May 2, 2019

import 'common.dart';

/// Default timeout value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: document that this should correspond to _kUnusuallyLongTimeout in driver.dart.

Perhaps it would make sense to just let that constant become public with an @visibleForTesting on it. It doesn't seem like it should hurt anything to leak that as public to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for review.
I will fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dnfield

I fixed !
5d929f1

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dnfield
Copy link
Contributor

dnfield commented May 4, 2019

Deploy gallery failure is safe to ignore here, thanks for this!

@dnfield dnfield merged commit d53115a into flutter:master May 4, 2019
@sensuikan1973 sensuikan1973 deleted the fix_driver_waitFor_timeout branch May 4, 2019 13:40
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

framework flutter/packages/flutter repository. See also f: labels. t: flutter driver "flutter driver", flutter_drive, or a driver test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants