Skip to content
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

Possibility for more custom strategies besides customAwaitStrategy. (E.G customBeforeStopStrategy) #646

Closed
jelmew opened this issue Mar 23, 2017 · 3 comments
Milestone

Comments

@jelmew
Copy link
Contributor

jelmew commented Mar 23, 2017

Issue Overview

BeforeStop events can be very restrictive at times. For integration with jacoco-agent, we would like to be able to send an request to the container (POST call) to shut down the jvm before we stop the container, so that some information is more complete. There already is an AwaitStrategy that can be implemented, for custom AwaitStrategies. would something similar also be possible for beforeStop?

Example:

beforeStop:

  • copy: ....
  • log: ...
  • my.own.package.name.CustomBeforeStopStrategy:

If this is easily implementable, I can try to make a pull request myself.

@lordofthejars
Copy link
Member

Hi, first of all thank you very much for using Cube. So first of all please feel free to provide a PR, they are more than welcome, and we can help you in anything.

Second really nice use case, are you planning to write about it?

Finally notice that if you are using in-container approach (@Deployment method) (not standalone) you can use https://github.com/arquillian/arquillian-extension-jacoco and should provide everything out of the box.

@jelmew
Copy link
Contributor Author

jelmew commented Mar 27, 2017

Hi,
I'll try try to make something for a PR, it seems like a nice exercise.

@jelmew
Copy link
Contributor Author

jelmew commented Mar 30, 2017

Hi, I made a rudimentary implementation. It is still WIP (E.G not ready yet), but I wanted to check if the general idea is a good one and I want to receive any feedback that I can learn from, since I'm still a rookie.

Edit: I finished it so that it looks like how I think it should look. What is the convention in terms of tests for arquillian cube?

@lordofthejars lordofthejars added this to the 1.1.0 milestone Apr 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants