mirror of https://github.com/grpc/grpc-java.git
Guava 20 introduced some overloading optimizations for Preconditions that require using Guava 20+ at runtime. Unfortunately, Guava 20 removes some things that is causing incompatibilities with other libraries, like Cassandra. While the incompatibility did trigger some of those libraries to improve compatibility for newer Guavas, we'd like to give the community more time to work through it. See #2688 At this commit, we appear to be compatible with Guava 18+. It's not clear if we want to actually "support" 18, but it did compile. Guava 17 doesn't have at least MoreObjects, directExecutor, and firstNotNull. Guava 21 compiles without warnings, so it should be compatible with Guava 22 when it is released. One test method will fail with the upcoming Guava 22, but this won't impact applications. I made MoreThrowables to avoid using any known-deprecated Guava methods in our JARs, to reduce pain for those stuck with old versions of gRPC in the future (July 2018). In the stand-alone Android apps I removed unnecessary explicit deps instead of syncing the version used. |
||
|---|---|---|
| .. | ||
| app | ||
| README.md | ||
| build.gradle | ||
| settings.gradle | ||
| start-emulator.sh | ||
| wait-for-emulator.sh | ||
README.md
gRPC Android test App
Implements gRPC integration tests in an Android App.
TODO(madongfly) integrate this App into the gRPC-Java build system.
In order to build this app, you need a local.properties file under this directory which specifies the location of your android sdk:
sdk.dir=/somepath/somepath/sdk
Connect your Android device or start the emulator:
$ ./start-emulator.sh <AVD name> & ./wait-for-emulator.sh
Start test server
Start the test server by:
$ ../run-test-server.sh
Manually test
Install the App by:
$ ../gradlew installDebug
Then manually test it with the UI.
Commandline test
Run the test with arguments:
$ adb shell am instrument -w -e server_host <hostname or ip address> -e server_port <port> -e server_host_override foo.test.google.fr -e use_tls true -e use_test_ca true -e test_case all io.grpc.android.integrationtest/.TesterInstrumentation
If the test passed successfully, it will output:
INSTRUMENTATION_RESULT: grpc test result=Succeed!!!
INSTRUMENTATION_CODE: 0
otherwise, output something like:
INSTRUMENTATION_RESULT: grpc test result=Failed... : <exception stacktrace if applicable>
INSTRUMENTATION_CODE: 1