Skip to content

Commit fdbd01b

Browse files
committed
Cleanup and don't test
1 parent feda558 commit fdbd01b

File tree

4 files changed

+4
-12
lines changed

4 files changed

+4
-12
lines changed

examples/examples_test.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ EXAMPLES=(
6767
"features/metadata_interceptor"
6868
"features/multiplex"
6969
"features/name_resolving"
70-
"features/opentelemetry"
7170
"features/orca"
7271
"features/retry"
7372
"features/unix_abstract"
@@ -123,7 +122,6 @@ declare -A EXPECTED_SERVER_OUTPUT=(
123122
["features/metadata_interceptor"]="key1 from metadata: "
124123
["features/multiplex"]=":50051"
125124
["features/name_resolving"]="serving on localhost:50051"
126-
["features/opentelemetry"]="serving on :50051"
127125
["features/orca"]="Server listening"
128126
["features/retry"]="request succeeded count: 4"
129127
["features/unix_abstract"]="serving on @abstract-unix-socket"
@@ -148,7 +146,6 @@ declare -A EXPECTED_CLIENT_OUTPUT=(
148146
["features/metadata_interceptor"]="BidiStreaming Echo: hello world"
149147
["features/multiplex"]="Greeting: Hello multiplex"
150148
["features/name_resolving"]="calling helloworld.Greeter/SayHello to \"example:///resolver.example.grpc.io\""
151-
["features/opentelemetry"]="this is examples/opentelemetry (from :50051)" # does this need to exit to work?
152149
["features/orca"]="Per-call load report received: map\[db_queries:10\]"
153150
["features/retry"]="UnaryEcho reply: message:\"Try and Success\""
154151
["features/unix_abstract"]="calling echo.Echo/UnaryEcho to unix-abstract:abstract-unix-socket"

examples/features/customloadbalancer/client/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func main() {
5353
mr.InitialState(resolver.State{
5454
Endpoints: []resolver.Endpoint{
5555
{Addresses: []resolver.Address{{Addr: addr1}}},
56-
{Addresses: []resolver.Address{{Addr: addr2}}}, // Do I need the addresses for this one?
56+
{Addresses: []resolver.Address{{Addr: addr2}}},
5757
},
5858
ServiceConfig: sc,
5959
})

examples/features/opentelemetry/client/main.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,9 @@ func main() {
4949
provider := metric.NewMeterProvider(
5050
metric.WithReader(exporter),
5151
)
52-
// why 64 for interop 65 for example?
5352
go http.ListenAndServe(*promAddr, promhttp.Handler())
5453

55-
/*ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
56-
defer cancel()*/
57-
// play around to see if examples pass with this - unbounded
5854
ctx := context.Background()
59-
6055
do := opentelemetry.DialOption(opentelemetry.Options{MetricsOptions: opentelemetry.MetricsOptions{MeterProvider: provider}})
6156

6257
cc, err := grpc.NewClient(*addr, grpc.WithTransportCredentials(insecure.NewCredentials()), do)
@@ -69,11 +64,11 @@ func main() {
6964
// Make a RPC every second. This should trigger telemetry to be emitted from
7065
// the client and the server.
7166
for {
72-
r, err := c.UnaryEcho(ctx, &echo.EchoRequest{Message: "this is examples/opentelemetry"}) // do I need to rename, any call options? echopb etc. Requires 1.21, but not unstable exporter not in g3
67+
r, err := c.UnaryEcho(ctx, &echo.EchoRequest{Message: "this is examples/opentelemetry"})
7368
if err != nil {
7469
log.Fatalf("UnaryEcho failed: %v", err)
7570
}
76-
fmt.Println(r) // Does this need to exit to pass examples test? I think I just run bash script to run examples test. Does example test need determinstic output from this? Does the read me need to be deterministic output?
71+
fmt.Println(r)
7772
time.Sleep(time.Second)
7873
}
7974
}

examples/helloworld/greeter_server/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
)
3232

3333
var (
34-
port = flag.Int("port", 50051, "The server port") // The port only is the variable thing...
34+
port = flag.Int("port", 50051, "The server port")
3535
)
3636

3737
// server is used to implement helloworld.GreeterServer.

0 commit comments

Comments
 (0)