-
Notifications
You must be signed in to change notification settings - Fork 805
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
refactor(bakery/test): wiremock cleanup #4527
Merged
jasonmcintosh
merged 4 commits into
spinnaker:master
from
dbyron-sf:orca-bakery-wiremock-cleanup
Sep 16, 2023
Merged
refactor(bakery/test): wiremock cleanup #4527
jasonmcintosh
merged 4 commits into
spinnaker:master
from
dbyron-sf:orca-bakery-wiremock-cleanup
Sep 16, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instead of wiremock to reduce dependencies snippets of ./gradlew orca-bakery:dependencies before: +--- com.github.tomakehurst:wiremock:2.15.0 | +--- org.eclipse.jetty:jetty-server:9.2.22.v20170606 -> 9.4.46.v20220331 | | +--- javax.servlet:javax.servlet-api:3.1.0 -> 4.0.1 | | +--- org.eclipse.jetty:jetty-http:9.4.46.v20220331 | | | +--- org.eclipse.jetty:jetty-util:9.4.46.v20220331 | | | \--- org.eclipse.jetty:jetty-io:9.4.46.v20220331 | | | \--- org.eclipse.jetty:jetty-util:9.4.46.v20220331 | | \--- org.eclipse.jetty:jetty-io:9.4.46.v20220331 (*) | +--- org.eclipse.jetty:jetty-servlet:9.2.22.v20170606 -> 9.4.46.v20220331 | | +--- org.eclipse.jetty:jetty-security:9.4.46.v20220331 | | | \--- org.eclipse.jetty:jetty-server:9.4.46.v20220331 (*) | | \--- org.eclipse.jetty:jetty-util-ajax:9.4.46.v20220331 | | \--- org.eclipse.jetty:jetty-util:9.4.46.v20220331 | +--- org.eclipse.jetty:jetty-servlets:9.2.22.v20170606 -> 9.4.46.v20220331 | | +--- org.eclipse.jetty:jetty-continuation:9.4.46.v20220331 | | +--- org.eclipse.jetty:jetty-http:9.4.46.v20220331 (*) | | +--- org.eclipse.jetty:jetty-util:9.4.46.v20220331 | | \--- org.eclipse.jetty:jetty-io:9.4.46.v20220331 (*) | +--- org.eclipse.jetty:jetty-webapp:9.2.22.v20170606 -> 9.4.46.v20220331 | | +--- org.eclipse.jetty:jetty-xml:9.4.46.v20220331 | | | \--- org.eclipse.jetty:jetty-util:9.4.46.v20220331 | | \--- org.eclipse.jetty:jetty-servlet:9.4.46.v20220331 (*) | +--- com.google.guava:guava:20.0 -> 30.0-jre (*) | +--- com.fasterxml.jackson.core:jackson-core:2.8.9 -> 2.12.7 (*) | +--- com.fasterxml.jackson.core:jackson-annotations:2.8.9 -> 2.12.7 (*) | +--- com.fasterxml.jackson.core:jackson-databind:2.8.9 -> 2.12.7.1 (*) | +--- org.apache.httpcomponents:httpclient:4.5.3 -> 4.5.13 (*) | +--- org.xmlunit:xmlunit-core:2.3.0 -> 2.8.4 | +--- org.xmlunit:xmlunit-legacy:2.3.0 -> 2.8.4 | | +--- org.xmlunit:xmlunit-core:2.8.4 | | \--- junit:junit:3.8.1 -> 4.13.1 (*) | +--- com.jayway.jsonpath:json-path:2.4.0 -> 2.5.0 (*) | +--- org.slf4j:slf4j-api:1.7.12 -> 1.7.36 | +--- net.sf.jopt-simple:jopt-simple:5.0.3 | +--- junit:junit:4.12 -> 4.13.1 (*) | +--- org.apache.commons:commons-lang3:3.6 -> 3.12.0 | +--- com.flipkart.zjsonpatch:zjsonpatch:0.3.0 | | +--- com.fasterxml.jackson.core:jackson-databind:2.8.5 -> 2.12.7.1 (*) | | +--- com.fasterxml.jackson.core:jackson-core:2.8.5 -> 2.12.7 (*) | | +--- com.google.guava:guava:18.0 -> 30.0-jre (*) | | \--- org.apache.commons:commons-collections4:4.1 -> 4.4 | \--- com.github.jknack:handlebars:4.0.6 | +--- org.apache.commons:commons-lang3:3.1 -> 3.12.0 | +--- org.antlr:antlr4-runtime:4.5.1-1 | \--- org.slf4j:slf4j-api:1.6.4 -> 1.7.36 after: +--- com.github.tomakehurst:wiremock-jre8-standalone -> 2.31.0
as they're not used. This is a spock test
…ryServiceSpec since the tests only need one. It's faster, and it prevents errors like: com.github.tomakehurst.wiremock.common.FatalStartupException: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8080 at app//com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:146) at app//com.netflix.spinnaker.orca.bakery.api.BakeryServiceSpec.setup(BakeryServiceSpec.groovy:55) Caused by: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8080 at com.github.tomakehurst.wiremock.jetty9.JettyHttpServer.start(JettyHttpServer.java:137) at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:144) ... 1 more Caused by: java.io.IOException: Failed to bind to /0.0.0.0:8080 at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:349) at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:310) at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80) at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:234) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) at org.eclipse.jetty.server.Server.doStart(Server.java:401) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) at com.github.tomakehurst.wiremock.jetty9.JettyHttpServer.start(JettyHttpServer.java:135) ... 2 more Caused by: java.net.BindException: Address already in use at java.base/sun.nio.ch.Net.bind(Net.java:455) at java.base/sun.nio.ch.Net.bind(Net.java:447) at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227) at java.base/sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:80) at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344) ... 9 more
dbyron-sf
changed the title
chore(bakery/test): use wiremock-jre8-standalone
refactor(bakery/test): wiremock cleanup
Sep 16, 2023
jasonmcintosh
approved these changes
Sep 16, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A bit of cleanup inspired by some flaky tests.