Skip to content

Commit

Permalink
examples: add feature/cancellation retry to example test script (#5846)
Browse files Browse the repository at this point in the history
  • Loading branch information
richzw committed Dec 7, 2022
1 parent 22c1fd2 commit 638141f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/examples_test.sh
Expand Up @@ -52,6 +52,7 @@ EXAMPLES=(
"helloworld"
"route_guide"
"features/authentication"
"features/cancellation"
"features/compression"
"features/deadline"
"features/encryption/TLS"
Expand All @@ -62,6 +63,7 @@ EXAMPLES=(
"features/metadata_interceptor"
"features/multiplex"
"features/name_resolving"
"features/retry"
"features/unix_abstract"
)

Expand Down Expand Up @@ -99,6 +101,7 @@ declare -A EXPECTED_SERVER_OUTPUT=(
["helloworld"]="Received: world"
["route_guide"]=""
["features/authentication"]="server starting on port 50051..."
["features/cancellation"]="server: error receiving from stream: rpc error: code = Canceled desc = context canceled"
["features/compression"]="UnaryEcho called with message \"compress\""
["features/deadline"]=""
["features/encryption/TLS"]=""
Expand All @@ -109,13 +112,15 @@ declare -A EXPECTED_SERVER_OUTPUT=(
["features/metadata_interceptor"]="key1 from metadata: "
["features/multiplex"]=":50051"
["features/name_resolving"]="serving on localhost:50051"
["features/retry"]="request succeeded count: 4"
["features/unix_abstract"]="serving on @abstract-unix-socket"
)

declare -A EXPECTED_CLIENT_OUTPUT=(
["helloworld"]="Greeting: Hello world"
["route_guide"]="Feature: name: \"\", point:(416851321, -742674555)"
["features/authentication"]="UnaryEcho: hello world"
["features/cancellation"]="cancelling context"
["features/compression"]="UnaryEcho call returned \"compress\", <nil>"
["features/deadline"]="wanted = DeadlineExceeded, got = DeadlineExceeded"
["features/encryption/TLS"]="UnaryEcho: hello world"
Expand All @@ -126,6 +131,7 @@ declare -A EXPECTED_CLIENT_OUTPUT=(
["features/metadata_interceptor"]="BidiStreaming Echo: hello world"
["features/multiplex"]="Greeting: Hello multiplex"
["features/name_resolving"]="calling helloworld.Greeter/SayHello to \"example:///resolver.example.grpc.io\""
["features/retry"]="UnaryEcho reply: message:\"Try and Success\""
["features/unix_abstract"]="calling echo.Echo/UnaryEcho to unix-abstract:abstract-unix-socket"
)

Expand Down

0 comments on commit 638141f

Please sign in to comment.