-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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 client split #11484
Xds client split #11484
Conversation
@@ -51,6 +51,7 @@ public class SharedXdsClientPoolProviderTest { | |||
@Rule | |||
public final ExpectedException thrown = ExpectedException.none(); | |||
private final Node node = Node.newBuilder().setId("SharedXdsClientPoolProviderTest").build(); | |||
private static final String DUMMY_TARGET = "dummy"; |
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.
We should test at least two targets, and verify, e.g. the second xdsClient is not the same instance as the first one, is ref counted.
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.
I see that multiple targets have been covered in csds service test. Still, it would be nice to have multiple targets tested in this UT.
String resourceType = value.getTypeUrl(); | ||
if (!value.getResponseNonce().isEmpty() | ||
&& !String.valueOf(xdsNonces.get(resourceType)).equals(value.getResponseNonce())) { | ||
if (!value.getResponseNonce().isEmpty() && xdsNonces.containsKey(resourceType) |
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 change also seems not related?
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 fix is needed to support anything trying a nonce other than the initial empty value.
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.
I still don't see this change related to "support multiple xds client". Looks this file can be reverted without impacting anything?
But I see this potentially avoid NPE when it receives another resource type other than the hardcoded resource type in xdsNonces
keyset.
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.
LGTM in general with two minor comments.
@@ -51,6 +51,7 @@ public class SharedXdsClientPoolProviderTest { | |||
@Rule | |||
public final ExpectedException thrown = ExpectedException.none(); | |||
private final Node node = Node.newBuilder().setId("SharedXdsClientPoolProviderTest").build(); | |||
private static final String DUMMY_TARGET = "dummy"; |
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.
I see that multiple targets have been covered in csds service test. Still, it would be nice to have multiple targets tested in this UT.
TimeProvider.SYSTEM_TIME_PROVIDER, | ||
MessagePrinter.INSTANCE, | ||
new TlsContextManagerImpl(bootstrapInfo)); | ||
} catch (Exception e) { |
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.
What is this catching? I don't see any new exceptions in #11254 either.
You don't need to wait for me to merge this. I wasn't planning on providing a full review. I just poked in and had the drive-by comment. |
Split off from #11254