You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Integration Test Port Integration and functional tests now run on a random port instead of the same port as the application by default. This is to avoid port conflict problems when the application is already running. Integration tests that hard code the port will need to be altered to use the serverPort property of tests marked with @Integration
In particular I am asking about this part:
Integration tests that hard code the port will need to be altered to use the serverPort property of tests marked with @Integration`
I don't understand exactly how to use the serverPort which is mentioned.
I read what you said in the change. Clicked in the @Integration annotation but did not see any parameter there. And I did not know about the @WebIntegrationTest(randomPort=false) syntax.
Is there any way to configure this globally?
As far as I understand: before the change, I would have had to set server.port=0 in a single place to get a random port. Now I need to add the annotation mentioned above on every single test class to get a static port. Is that correct?
From Grails 3.1.9 relase notes:
Integration Test Port Integration and functional tests now run on a random port instead of the same port as the application by default. This is to avoid port conflict problems when the application is already running. Integration tests that hard code the port will need to be altered to use the serverPort property of tests marked with @Integration
In particular I am asking about this part:
I don't understand exactly how to use the serverPort which is mentioned.
I've tried editing application.yml
or
or
Steps to Reproduce
Expected Behaviour
I expect this test to pass:
Actual Behaviour
grails test-app -integration fails
Environment Information
The text was updated successfully, but these errors were encountered: