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

test: switching to stubserver in tests instead of testservice #7925

Merged
merged 5 commits into from
Dec 18, 2024

Conversation

pvsravani
Copy link
Contributor

@pvsravani pvsravani commented Dec 12, 2024

Partially Addresses: #7291

RELEASE NOTES: None

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.20%. Comparing base (66ba4b2) to head (00b8779).
Report is 11 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7925      +/-   ##
==========================================
+ Coverage   82.04%   82.20%   +0.15%     
==========================================
  Files         377      379       +2     
  Lines       38180    38261      +81     
==========================================
+ Hits        31326    31453     +127     
+ Misses       5551     5517      -34     
+ Partials     1303     1291      -12     

see 36 files with indirect coverage changes

@purnesh42H purnesh42H self-assigned this Dec 14, 2024
Copy link
Contributor

@purnesh42H purnesh42H left a comment

Choose a reason for hiding this comment

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

lgtm

@purnesh42H purnesh42H assigned easwars and unassigned purnesh42H Dec 16, 2024
@purnesh42H
Copy link
Contributor

@easwars for second review

Comment on lines 420 to 427
stub := &stubserver.StubServer{
Listener: lis,
EmptyCallF: func(_ context.Context, _ *testpb.Empty) (*testpb.Empty, error) {
return &testpb.Empty{}, nil
},
}

stub.S = grpc.NewServer()
Copy link
Contributor

Choose a reason for hiding this comment

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

How about moving the initialization of the S field inside the literal struct defintion?

	stub := &stubserver.StubServer{
		Listener: lis,
		EmptyCallF: func(_ context.Context, _ *testpb.Empty) (*testpb.Empty, error) {
			return &testpb.Empty{}, nil
		},
		S: grpc.NewServer(),
	}

Here and in the other three places in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@easwars easwars assigned pvsravani and unassigned easwars Dec 16, 2024
@purnesh42H purnesh42H requested a review from easwars December 18, 2024 05:58
@purnesh42H purnesh42H assigned easwars and unassigned pvsravani Dec 18, 2024
@easwars easwars added this to the 1.70 Release milestone Dec 18, 2024
@easwars easwars merged commit b3bdacb into grpc:master Dec 18, 2024
15 checks passed
vinothkumarr227 pushed a commit to vinothkumarr227/grpc-go that referenced this pull request Dec 23, 2024
vinothkumarr227 added a commit to vinothkumarr227/grpc-go that referenced this pull request Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants