-
Notifications
You must be signed in to change notification settings - Fork 98
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
Unable to run a test more than once when using a dependent service #79
Comments
Hi, well first thing to note is that About your question: Well the problem is that in cube we always destroy the containers after the execution because it can be started again in next test. If for example your test doesn't finish because you halt it manually then the container is not destroyed so it cannot be created after that. So what you need to do is remove it manually. Also until we fix the issue with autostart I recommend you to I left the issue opened to improve this situation by destroying container before start in case it is already started. |
@lordofthejars destroying the container before start sounds a bit scary. A little miss config and stuff gets lost. |
@aslakknutsen I totally agree with you, maybe it is better to leave as is, but maybe we could capture the exception and if the exception is that the container is already started we could or simply avoid the creation and start or we can destroy and recreate. As I said the best way would be leave as is, but we can think other alternatives as well. |
@aslakknutsen and @lordofthejars I would think as a laymen user this would be an idempotent operation. I would envision the following semantics to make it a bit more user friendly and declartive.
Then for cleaning Is it possible to allow users to invoke a clean command to remove existing images? IMHO this is kind of an edge case. I think it's safer and easier to simply document this and allow users to remove their own images. Since there's a strong toolset around this, and it's a 1 off sort of scenario, I can't envision it's something that users would need to run on every build. Thoughts? |
So we can do two things, document this and add in documentation the command that must be run to destroy the container, or we can create an attribute which tells if should connect to existing running container, throw an exception or remove it. Basically is changing shouldAllowToConnectToRunningContainers to a new name and new type instead of a boolean. WDYT? |
This is slightly different tho. It's not allow to connect to, but allow to If the container is running is a different concern. On Thu, Jan 29, 2015, 16:59 Alex Soto [email protected] wrote:
|
I'm a bit new on this.. But existing container could have a different state Basically we need to track, has our configuration for creating this |
Hey guys, I'm working on a fix for this now. It's actually a trivial fix and test. However, there's no test for the DockerClientExecutor class. I would like to get this set up a few tests with a small "hello world" type of docker image. Is there an image you guys would prefer I use for this test? |
We don't have any predefined image, if you want you can use the docker-server-stub to create a test if you want to use a stub instead of a true docker server, but feel free. https://github.com/arquillian/arquillian-cube/tree/master/docker-server-stub |
On one hand we have the reconnect feature to allow reusing a running container to save startup time during development, but could also be used to connect to existing containers that are running/started by 3. party for what ever reason. On the other we have crashed images.. Being able to clean up a existing container would be a nice feature, tho I don't think it should be default. Take the build server scenario for instance. Jenkins is running, the build crash for what ever reason and you're now left with x number of 'stuck' containers. The build will continue to fail until someone manually goes and cleans up the docker server used by the job. In this scenario I think both reconnect and reuse are wrong:
|
After talking with @aslakknutsen we are going to close this issue because it is the same as #67 in the sense that talks about reusing an existing running container. We are going to continue the discussing there. @tnine Has it sense to you to talk on that issue about the problem of reusing containers? |
I have the following arquillian.xml file.
When I run my trivial test below, it runs the first time
Subsequent invocation results in the following error.
I'm not sure where to start to resolve this issue. I'm on version 1.0.0.Alpha3, Arquillian version 1.1.6.Final
The text was updated successfully, but these errors were encountered: