Skip to content

Commit

Permalink
Merge branch 'jaegertracing:main' into dep-cli-flags
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyyy09 committed May 13, 2024
2 parents 17a7451 + 5757c56 commit 5558dd5
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 90 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
go-version: 1.22.x
cache-dependency-path: ./go.sum

# download dependencies separately to keep unit test step's output cleaner
- name: go mod download
run: go mod download

- name: Install test deps
# even though the same target runs from test-ci, running it separately makes for cleaner log in GH workflow
run: make install-test-tools
Expand Down
6 changes: 1 addition & 5 deletions cmd/jaeger/internal/integration/span_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"io"
"math"
"strings"
"time"

"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
Expand Down Expand Up @@ -39,10 +38,7 @@ func createSpanReader(port int) (*spanReader, error) {
grpc.WithTransportCredentials(insecure.NewCredentials()),
}

ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()

cc, err := grpc.DialContext(ctx, ports.PortToHostPort(port), opts...)
cc, err := grpc.NewClient(ports.PortToHostPort(port), opts...)
if err != nil {
return nil, err
}
Expand Down
5 changes: 1 addition & 4 deletions cmd/query/app/grpc_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,7 @@ func newGRPCServer(t *testing.T, q *querysvc.QueryService, mq querysvc.MetricsQu
}

func newGRPCClient(t *testing.T, addr string) *grpcClient {
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
defer cancel()
// TODO: Need to replace grpc.DialContext with grpc.NewClient and pass test
conn, err := grpc.DialContext(ctx, addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
conn, err := grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
require.NoError(t, err)

return &grpcClient{
Expand Down
3 changes: 2 additions & 1 deletion cmd/query/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func (s *Server) Start() error {
if err != nil && !errors.Is(err, http.ErrServerClosed) && !errors.Is(err, cmux.ErrListenerClosed) && !errors.Is(err, cmux.ErrServerClosed) {
s.logger.Error("Could not start HTTP server", zap.Error(err))
}

s.logger.Info("HTTP server stopped", zap.Int("port", httpPort), zap.String("addr", s.queryOptions.HTTPHostPort))
s.healthCheck.Set(healthcheck.Unavailable)
s.bgFinished.Done()
}()
Expand All @@ -321,6 +321,7 @@ func (s *Server) Start() error {
if err := s.grpcServer.Serve(s.grpcConn); err != nil {
s.logger.Error("Could not start GRPC server", zap.Error(err))
}
s.logger.Info("GRPC server stopped", zap.Int("port", grpcPort), zap.String("addr", s.queryOptions.GRPCHostPort))
s.healthCheck.Set(healthcheck.Unavailable)
s.bgFinished.Done()
}()
Expand Down

0 comments on commit 5558dd5

Please sign in to comment.