fix: #1660 - correction for ping method to get proper status URL in case of a basepath provided#1661
Merged
mykola-mokhnach merged 8 commits intoappium:masterfrom Mar 19, 2022
Merged
Conversation
…ervice is not able to start - checkStatus is failing
Fix for basePath appending logic to fix Issue appium#1660
|
valfirst
requested changes
Mar 17, 2022
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
Contributor
Author
|
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
valfirst
requested changes
Mar 18, 2022
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
valfirst
requested changes
Mar 18, 2022
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, () -> { |
Contributor
There was a problem hiding this comment.
FYI: you could add expected exception signature to Test annotations: https://www.guru99.com/junit-exception-test.html
Contributor
Author
There was a problem hiding this comment.
Noted with thanks.
mykola-mokhnach
approved these changes
Mar 19, 2022
valfirst
approved these changes
Mar 19, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
xin the boxes that applyDetails
Test Execution logs - https://gist.github.com/robinGupta11392/e8c37c7e10e03cd00a4d44d398402738
Issue fixed - #1660
Changed Classes:
Method Added:
Method Modified:
Test Added: