Skip to content
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

fix: update ExpectedCondition to extend java util Function #10695

Merged
merged 5 commits into from
Jun 8, 2022

Conversation

ammmze
Copy link
Contributor

@ammmze ammmze commented May 26, 2022

Description

Some builds of guava have Function that does NOT extend the java native function. This causes ExpectedCondition instances to be incompatible the various wait until methods that were recently updated to accept java.util.function.Function. See more here.

Motivation and Context

Fixes #10606

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation. N/A
  • I have updated the documentation accordingly. N/A
  • I have added tests to cover my changes. Not testable unless we are running with a different version of guava (specifically the "android" builds because those are java 7 compatible and therefore don't have the java.util.function.Function interface iirc)
  • All new and existing tests passed. ... having issues getting some tests working. On the small tests had one failure mentioning no port available, but all the others passed. I don't recall what the large tests failed with, but it was something with the StressTest or whatever it was called.

@CLAassistant
Copy link

CLAassistant commented May 26, 2022

CLA assistant check
All committers have signed the CLA.

@ammmze ammmze marked this pull request as ready for review May 26, 2022 05:26
@codecov-commenter
Copy link

codecov-commenter commented May 26, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.56%. Comparing base (7bd9b06) to head (c21ef80).
Report is 3983 commits behind head on trunk.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #10695   +/-   ##
=======================================
  Coverage   46.56%   46.56%           
=======================================
  Files          86       86           
  Lines        5863     5863           
  Branches      278      278           
=======================================
  Hits         2730     2730           
  Misses       2855     2855           
  Partials      278      278           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ammmze
Copy link
Contributor Author

ammmze commented May 27, 2022

Hmm...all the failing tests are ruby ones...surely those are not caused by this java change 🤷🏻‍♂️

@pujagani
Copy link
Contributor

The changes look good to me for now. But I think we should try to move away from Guava and implement things Java way in the long run. It will be a big change and my concern is how it will impact the users. But we can consider it for 4.3 or 4.4.

@ammmze
Copy link
Contributor Author

ammmze commented May 27, 2022

The changes look good to me for now. But I think we should try to move away from Guava and implement things Java way in the long run. It will be a big change and my concern is how it will impact the users. But we can consider it for 4.3 or 4.4.

Agreed! For now, this is just a backwards compatible change that should resolve things that were not intended to break when upgrading from selenium 3.x to 4.x (i.e. if a project used the wrong version of guava, then ExpectedCondition could no longer be used directly after upgrading to 4.x).

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 8, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

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

Thank you, @ammmze!

@diemol diemol merged commit 38e8963 into SeleniumHQ:trunk Jun 8, 2022
@ammmze ammmze deleted the java-func branch June 15, 2022 16:30
elgatov pushed a commit to elgatov/selenium that referenced this pull request Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: wait.until is not usable
5 participants