-
-
Notifications
You must be signed in to change notification settings - Fork 768
fix: #1660 - correction for ping method to get proper status URL in case of a basepath provided #1661
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
Conversation
…ervice is not able to start - checkStatus is failing
Fix for basePath appending logic to fix Issue appium#1660
|
src/main/java/io/appium/java_client/service/local/AppiumDriverLocalService.java
Outdated
Show resolved
Hide resolved
src/main/java/io/appium/java_client/service/local/AppiumDriverLocalService.java
Outdated
Show resolved
Hide resolved
src/main/java/io/appium/java_client/service/local/AppiumDriverLocalService.java
Outdated
Show resolved
Hide resolved
src/main/java/io/appium/java_client/service/local/AppiumDriverLocalService.java
Outdated
Show resolved
Hide resolved
…LocalService.java Removing redundant parenthesis Co-authored-by: Valery Yatsynovich <valfirst@yandex.ru>
src/main/java/io/appium/java_client/service/local/AppiumDriverLocalService.java
Outdated
Show resolved
Hide resolved
…reviews - replaced String#isBlank with StringUtils#isBlank for Java language compatibility - introduced InvalidBasePathException to be thrown for blank/null/empty values of basepath - basePath validations moved to the step of storing server arguments to give forward compatibility with Appium v2 fix: added extra test cases for more precisely testing basepath validations
https://gist.github.com/robinGupta11392/19cb22749170119d791cbeb8e1a714b3 --> ServerBuilderTest execution logs with Appium V2 Beta 25 post the fix. It seems there is one Log test failing right from the moment i cloned it - maybe you guys can have a look for reference. |
src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java
Outdated
Show resolved
Hide resolved
src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java
Outdated
Show resolved
Hide resolved
src/test/java/io/appium/java_client/service/local/ServerBuilderTest.java
Outdated
Show resolved
Hide resolved
src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java
Outdated
Show resolved
Hide resolved
src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java
Outdated
Show resolved
Hide resolved
src/test/java/io/appium/java_client/service/local/ServerBuilderTest.java
Outdated
Show resolved
Hide resolved
removed redundant validation of StringUtils#isBlank() on the basepath replaced Assert#fail with Assert#assertThrows for the test cases
src/test/java/io/appium/java_client/service/local/ServerBuilderTest.java
Outdated
Show resolved
Hide resolved
src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java
Outdated
Show resolved
Hide resolved
src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java
Outdated
Show resolved
Hide resolved
src/test/java/io/appium/java_client/service/local/ServerBuilderTest.java
Outdated
Show resolved
Hide resolved
src/test/java/io/appium/java_client/service/local/ServerBuilderTest.java
Outdated
Show resolved
Hide resolved
src/test/java/io/appium/java_client/service/local/ServerBuilderTest.java
Outdated
Show resolved
Hide resolved
src/test/java/io/appium/java_client/service/local/ServerBuilderTest.java
Outdated
Show resolved
Hide resolved
…eBuilder.java Co-authored-by: Valery Yatsynovich <valfirst@yandex.ru>
Removed validations of exception message in the tests Accepted the change from val to use checkArgument method from Preconditions class
|
||
@Test | ||
public void checkAbilityToValidateBasePathForEmptyBasePath() { | ||
assertThrows(IllegalArgumentException.class, () -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: you could add expected exception signature to Test annotations: https://www.guru99.com/junit-exception-test.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted with thanks.
Change list
Fixed the logic of appending basepath to the Hub URL which fixes Issue #1660 - #1660.
AppiumDriverLocalService was not able to start with Appium CLI versions < 2 as the ping() method was not able to get the status URL properly. Fixed the logic of appending basepath to sanitise the user input and appending basepath with "/" in the end, if not provided by user.
Types of changes
What types of changes are you proposing/introducing to Java client?
Put an
x
in the boxes that applyDetails
Test Execution logs - https://gist.github.com/robinGupta11392/e8c37c7e10e03cd00a4d44d398402738
Issue fixed - #1660
Changed Classes:
Method Added:
Method Modified:
Test Added: