Comments (3)
[copying my response here, since replying via e-mail didn't seem to do this]
Hi Sergei,
Sorry for the delayed response, thanks for getting in touch (and thanks for Testcontainers!).
Responding inline:
Sergei Egorov wrote:
Hi!
Disclaimer: I am one of the Testcontainers' maintainers
I was looking at your usage and noticed a couple of things, and thought about posting some findings:
1. DockerWebDriverRule
I see that you have the following:
https://github.com/google/nomulus/blob/3cc8d83396bc74076dc7d21d9f740b37e94471c6/core/src/test/java/google/registry/webdriver/DockerWebDriverRule.javaThe question is: have you considered using the Testcontainers' Selenium module? It looks very
similar to what you have, so it is less code to maintain :)
@hstonec or @gbrodman might be able to answer this.
2.
localhost
usageI noticed what you use static
localhost
as host:
But I wanted to warn you that there are cases where it is not
localhost
(e.g.docker-machine
, or remote Docker, or running a build inside a container). Fo
r that, Testcontainers providesContainer#getContainerIpAddress()
, so that the linked line can be changed to:url = new URL( String.format( "http://%s:%d/wd/hub", container.getContainerIpAddress(), container.getMappedPort(CHROME_DRIVER_SERVICE_PORT)));
We're familiar with getContainerIpAddress() and are using it in other places,
this must have been an oversight. We don't currently kick off containers
remotely, but it's conceivable that someone might so we should fix this.
3. new lines
I just noticed https://github.com/google/nomulus/blob/365c5da9426f9bb7ea1a735fb33cb038cfa23603/db/src/test/java/google/registry/sql/flyway/SchemaTest.java#L53\
. Thanks a lot for reporting, we will take a look at it ASAP! Perhaps you have a simple reproducer to start with, btw?
I'm guessing that we probably don't? @hstonec would know.
4. Shutdown hook
Just FYI, there is no need [to register a shutdown hook](https://github.com/google/nomulus/blob/68887d427f8802c30f80efb13101393cb4fff14b/core/src/test/java/go\
ogle/registry/model/transaction/JpaTransactionManagerRule.java#L121) because we already have it. Even more - we have a special sidecar container that monitors t
he connection to the tests process and terminates the container if the tests are killed (e.g. withkill -9
), because, when killed, JVM won't trigger the shutd
own hooks.
Good to know! We'll remove it.
I hope it will be helpful for your usage! :)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#401
from nomulus.
I think we've covered everything in this issue so I'm closing this issue. Thanks for the report, @bsideup !
from nomulus.
Hi Sergei,
regarding the spurious newline, I added some comments today to the issue I opened.
Our specific problem has gone away, and I suspect it is 'fixed' by changes in transitive dependencies that testcontainer uses (I can still reproduce the problem at an older commit with locked dependencies). However I'm not sure whether this applies to small output sizes only or arbitrary-sized output.
Regards.
from nomulus.
Related Issues (20)
- Can you Deploy to services like Netlify, Heroku, etc. and/or cPanel? HOT 4
- [Feature Request] Provide structured data with new domain deletion poll message
- max_instances is set to 100 for the backend service HOT 4
- Build fails because "Gradle build daemon disappeared unexpectedly" HOT 1
- Execution failed for task ":core:fragileTest"
- FOSS Build Fail
- Security Policy violation Binary Artifacts HOT 18
- Facing problem for task ":core:fragileTest" as Execution is Failed HOT 2
- Issue Templates ⚠ HOT 1
- Outdated Documentation - Cloud SecretManager HOT 2
- Task :core:fragileTest FAILED, FAILURE: Build failed with an exception.
- I found a typo bug in the provided Markdown file. In the section "Build the tool," there is an incorrect path mentioned for aliasing the compiled binary. HOT 2
- File upload done. ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: The first service (module) you upload to a new application must be the 'default' service (module). Please upload a version of the 'default' service (module) before uploading a version for the 'backend' service (module). See the documentation for more information. Python: (https://developers.google.com/appengine/docs/python/modules/#Python_Uploading%%20modules) Java: (https://developers.google.com/appengine/docs/java/modules/#Java_Uploading%%20modules) HOT 1
- RegistrarConsoleScreenshotTest HOT 3
- Schema publication fails in alpha HOT 1
- Install guide is outdated. | Bazel fails to build HOT 32
- Validation exception in host HOT 1
- javadoc generation failed HOT 1
- There is a vulnerability in google-closure-library 20190325.0.0,upgrade recommended
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nomulus.