-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Added newNetwork method #9371
base: main
Are you sure you want to change the base?
Added newNetwork method #9371
Conversation
…lization Signed-off-by: dhoard <[email protected]>
Thanks @dhoard, I don't understand why you can't share the So what is the strong need for this?
|
@kiview The goal is to be able the verify the Network is created to prevent unnecessary work setting up multiple test containers (map/copy files, etc.) only for the network to fail. A —- Real world usage is testing the Prometheus JMX Exporter. |
Summary
Added
Network.newNetwork(boolean initialize)
method to force initialization on creation.Purpose
When writing integration tests, I want to confirm that the network has been created before proceeding.
The current API requires two method calls:
The new method would allow a single method call:
Real-world example
Prometheus JMX Exporter integration tests
Using the existing
netNetwork
method:Reference:
https://github.com/prometheus/jmx_exporter/blob/89949413148adcfbc8ded41a2d931c8ef608ab2d/integration_test_suite/integration_tests/src/test/java/io/prometheus/jmx/test/common/AbstractExporterTest.java#L65-L75
Using the new
newNetwork(boolean initialize)
method: