Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
xds: listener type validation #11933
base: master
Are you sure you want to change the base?
xds: listener type validation #11933
Changes from 12 commits
4eb625a
ad90963
01927a6
8780c52
76270a4
da0d5ab
ba8af22
694c2f1
506bbe4
87aad6f
239f167
ca5bb14
cb41652
e07158f
9f79e8c
d8fb13a
6873d59
b3908f1
4dc1039
3a36c2d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 169 in xds/src/main/java/io/grpc/xds/XdsListenerResource.java
xds/src/main/java/io/grpc/xds/XdsListenerResource.java#L169
Check warning on line 172 in xds/src/main/java/io/grpc/xds/XdsListenerResource.java
xds/src/main/java/io/grpc/xds/XdsListenerResource.java#L172
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add unit test for this case as well.
Check warning on line 391 in xds/src/main/java/io/grpc/xds/XdsServerWrapper.java
xds/src/main/java/io/grpc/xds/XdsServerWrapper.java#L390-L391
Check warning on line 468 in xds/src/main/java/io/grpc/xds/XdsServerWrapper.java
xds/src/main/java/io/grpc/xds/XdsServerWrapper.java#L468
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have a unit test for this if block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already done in
@Before
. Delete it?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This thread is going to be hanging and outlive the test. Run
xdsServerWrapper.shutdownNow()
at the end to let the start() return. Ideally you'd wait for thestart
future to complete as well (which will throw an exception), so you know the thread has (essentially) returned.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a teardown happening after every test in
@After
which doesxdsServerWrapper.shutdownNow()
. So I doubt if we should be adding in the test as well!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, shutdownNow can be called twice. I'm not wild about the lifecycles in the test as we won't notice if it is broken. But I think a lot of these tests are bad already, so let's call it good enough as-is.