File tree Expand file tree Collapse file tree
app/src/main/java/io/grpc/android/integrationtest Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,11 +45,11 @@ $ adb shell am instrument -w -e server_host <hostname or ip address> -e server_p
4545
4646If the test passed successfully, it will output:
4747```
48- INSTRUMENTATION_RESULT: grpc test result=Succeed!! !
49- INSTRUMENTATION_CODE: 0
48+ INSTRUMENTATION_RESULT: grpc test result=Success !
49+ INSTRUMENTATION_CODE: -1
5050```
5151otherwise, output something like:
5252```
5353INSTRUMENTATION_RESULT: grpc test result=Failed... : <exception stacktrace if applicable>
54- INSTRUMENTATION_CODE: 1
54+ INSTRUMENTATION_CODE: 0
5555```
Original file line number Diff line number Diff line change 6060 * Implementation of the integration tests, as an AsyncTask.
6161 */
6262final class InteropTester extends AsyncTask <Void , Void , String > {
63- static final String SUCCESS_MESSAGE = "Succeed!! !" ;
63+ static final String SUCCESS_MESSAGE = "Success !" ;
6464 static final String LOG_TAG = "GrpcTest" ;
6565
6666 private ManagedChannel channel ;
Original file line number Diff line number Diff line change 1616
1717package io .grpc .android .integrationtest ;
1818
19+ import android .app .Activity ;
1920import android .app .Instrumentation ;
2021import android .os .Bundle ;
2122import android .util .Log ;
@@ -88,17 +89,17 @@ public void onPostTest(String result) {
8889 Bundle bundle = new Bundle ();
8990 bundle .putString ("grpc test result" , result );
9091 if (InteropTester .SUCCESS_MESSAGE .equals (result )) {
91- finish (0 , bundle );
92+ finish (Activity . RESULT_OK , bundle );
9293 } else {
93- finish (1 , bundle );
94+ finish (Activity . RESULT_CANCELED , bundle );
9495 }
9596 }
9697 },
9798 useGet ).execute ();
9899 } catch (Throwable t ) {
99100 Bundle bundle = new Bundle ();
100101 bundle .putString ("Exception encountered" , t .toString ());
101- finish (1 , bundle );
102+ finish (Activity . RESULT_CANCELED , bundle );
102103 }
103104 }
104105}
You can’t perform that action at this time.
0 commit comments