File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
examples/grpc/grpc-unary-client Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ package client
22
33import (
44 "context"
5- "fmt"
6- "os"
75 "testing"
86
97 "github.com/stretchr/testify/assert"
@@ -148,13 +146,10 @@ func TestGoFrHelloClientWrapper_MultipleInstances(t *testing.T) {
148146}
149147
150148func TestGoFrHelloClientWrapper_ErrorHandling (t * testing.T ) {
151- configs : = testutil .NewServerConfigs (t )
149+ _ = testutil .NewServerConfigs (t )
152150
153151 // Test GoFr's error handling patterns
154152 t .Run ("InvalidAddressHandling" , func (t * testing.T ) {
155- // Set HTTP port to avoid port conflicts
156- os .Setenv ("HTTP_PORT" , fmt .Sprintf ("%d" , configs .HTTPPort ))
157-
158153 // Test GoFr's handling of invalid addresses
159154 app := gofr .New ()
160155 helloClient , err := NewHelloGoFrClient ("invalid:address" , app .Metrics ())
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ func TestIntegration_UnaryClient(t *testing.T) {
6060 time .Sleep (100 * time .Millisecond )
6161
6262 // Set the gRPC server host for the client
63- os .Setenv ("GRPC_SERVER_HOST" , configs .GRPCHost )
63+ t .Setenv ("GRPC_SERVER_HOST" , configs .GRPCHost )
6464
6565 // Start the HTTP server (unary client example)
6666 go main ()
@@ -119,7 +119,7 @@ func TestIntegration_UnaryClient_Concurrent(t *testing.T) {
119119 time .Sleep (100 * time .Millisecond )
120120
121121 // Set the gRPC server host for the client
122- os .Setenv ("GRPC_SERVER_HOST" , configs .GRPCHost )
122+ t .Setenv ("GRPC_SERVER_HOST" , configs .GRPCHost )
123123
124124 // Start the HTTP server (unary client example)
125125 go main ()
You can’t perform that action at this time.
0 commit comments