Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] fix flaky test TestStartAndShutdownRemote #9113 #19460

Merged
merged 1 commit into from
Mar 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions extension/jaegerremotesampling/extension_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func TestStartAndShutdownRemote(t *testing.T) {

// create the config, pointing to the mock server
cfg := testConfig()
cfg.GRPCServerSettings.NetAddr.Endpoint = "127.0.0.1:0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm. Isnt that default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, the value set in testConfig() the line above does this:

	cfg := createDefaultConfig().(*Config)
	cfg.HTTPServerSettings.Endpoint = "127.0.0.1:5778"
	cfg.GRPCServerSettings.NetAddr.Endpoint = "127.0.0.1:14250"
	return cfg

The errors we get are:
error while starting the gRPC server: failed to listen on gRPC port: listen tcp :14250: bind: address already in use

cfg.Source.Remote = &configgrpc.GRPCClientSettings{
Endpoint: fmt.Sprintf("127.0.0.1:%d", lis.Addr().(*net.TCPAddr).Port),
WaitForReady: true,
Expand Down