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

Task - "integrationTest" always assumes, it needs to start tomcat before and stop after tests #10

Open
mkornipati opened this issue Apr 13, 2016 · 5 comments

Comments

@mkornipati
Copy link

This is same as created @ akhikhl#244


I am referring to the "Gretty Configuration" and understood that the default value for integrationTestTask is integrationTest.

We got few projects where we don't need the Tomcat needs to be running for integrationTest Task. and actually name of the integrationTest task is integrationTest. I am looking for Gretty Configurations to see, if I can say, I don't need Tomcat start and stop for my "integrationTest" task. Can you point me to right configuration if any.

Here are few other observations.
I tried setting the integrationTestTask as null or '', but I can still see the Tasks - appBeforeIntegrationTestand appAfterIntegrationTest getting executed.
The reason seems to be because appBeforeIntegrationTest.integrationTestTaskAssigned, appAfterIntegrationTest.integrationTestTaskAssigned is alwaystrue and it is not updated to 'false' when I am updating value of integrationTestTask to null or empty string?

@saladinkzn
Copy link
Owner

Hello.

Do you set integration task to null in gretty configuration? Like:

gretty {
     integrationTestTask = null
}

What I see here, that there's a bug if you don't set integrationTestTask to null in Gretty configuration you actually get it used in AppBeforeIntegrationTestTask if none or falsy is assigned in it.

@mkornipati
Copy link
Author

Yes @saladinkzn. As mentioned in the the description, I tried setting the integrationTestTask as nullor '' and both not worked.

@saladinkzn
Copy link
Owner

OK, I'll check it out today

2016-04-14 15:31 GMT+03:00 Mohan Kornipati notifications@github.com:

Yes @saladinkzn https://github.com/saladinkzn. As mentioned in the the
description, I tried setting the integrationTestTask as nullor '' and
both not worked.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#10 (comment)

@mkornipati
Copy link
Author

Thanks @saladinkzn and just to let you know, currently, as a workaround we are removing the appBeforeIntegrationTest from integrationTest.dependsOnand appAfterIntegrationTest from integrationTest.finalizedBy

     project.integrationTest.dependsOn.remove(project.tasks['appBeforeIntegrationTest'])
     project.integrationTest.finalizedBy.values.remove(project.tasks['appAfterIntegrationTest'])

@saladinkzn
Copy link
Owner

Well, I've tested gist and it's working as expected (server is not started when integrationTest task is called using ./gradlew integrationTest

Could you provide a minimal example when appBeforeIntegrationTest is called even when integrationTestTask is set to null?

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