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

"order" for Hooks in Groovy. #807

Closed
mhshams opened this issue Dec 8, 2014 · 3 comments
Closed

"order" for Hooks in Groovy. #807

mhshams opened this issue Dec 8, 2014 · 3 comments

Comments

@mhshams
Copy link
Contributor

mhshams commented Dec 8, 2014

Apparently there is no way to set execution order for hooks in groovy.
In java implementation you can set the execution order in annotation @Before(order = 100) . but that's not the case in groovy.

Looking at "GroovyHookDefinition.groovy" class, one can see following code implemented for "getOrder" which is returning the order based on filename and not be user provided order.

    @Override
    public int getOrder() {
        return location.getFileName() == "env.groovy" ? -1 : 0;
    }
@aslakhellesoy
Copy link
Contributor

Would you be interested in contributing a fix for this?

@mhshams
Copy link
Contributor Author

mhshams commented Dec 9, 2014

@aslakhellesoy, yeah sure.
Though, Looking at current implementation, I'm not sure if I can keep it backward compatible.

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants