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: Fake control plane test setup code to Rules #9666
Conversation
nameResolverProvider = XdsNameResolverProvider.createForTest(SCHEME, | ||
defaultBootstrapOverride()); | ||
NameResolverRegistry.getDefaultRegistry().register(nameResolverProvider); |
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.
Is it better to move to data plane?
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 included it here because my thinking was that this rule handles everything needed to make a control plane available to use, not just the server startup. And since registering this test nameserver is part of that, I'd keep it here.
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. My thinking was that this belongs to Data Plane while this file is called Control Plane. But thats monior.
xds/src/test/java/io/grpc/xds/FakeControlPlaneXdsIntegrationTest.java
Outdated
Show resolved
Hide resolved
This extracts the startup and shutdown code for the control and data plane server to reparate JUnit rules, which allows this logic to be resued in other tests in a simple manner. Also makes the test easier to read with the boiler plate init code removed.
82cb3d3
to
d6bbcad
Compare
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. Thank you for the change, its great!
This extracts the startup and shutdown code for the control and data plane server to separate JUnit rules, which allows this logic to be reused in other tests in a simple manner. Also makes the test easier to read with the boiler plate init code removed.