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
Grails integration tests are not honoring the port number configured. Only run-app is using the specified port, but not test-app
Task List
Steps to reproduce provided
Stacktrace
Example that reproduces the problem uploaded to Github
Full description of the issue provided (see below)
Steps to Reproduce
1 . create an integration test
2. start an application which is bound to 8080
3. grails test-app -integration //fails
OR
grails --server.port=9999 test-app -integration //fails
OR
grails --port=9999 test-app -integration //fails
OR
application.yml
server:
port: 9999
grails test-app -integration //fails
4. Using environmental variable
SERVER_PORT=9999 grails test-app -integration //PASSED
Even using PORT=0 (random port) in above variables has same behaviour. So, underlying issue is, only environmental variable is honored. Other supported was are not working for test-app
Grails integration tests are not honoring the port number configured. Only run-app is using the specified port, but not test-app
Task List
Steps to Reproduce
1 . create an integration test
2. start an application which is bound to 8080
3. grails test-app -integration //fails
OR
grails --server.port=9999 test-app -integration //fails
OR
grails --port=9999 test-app -integration //fails
OR
application.yml
server:
port: 9999
grails test-app -integration //fails
4. Using environmental variable
SERVER_PORT=9999 grails test-app -integration //PASSED
Stacktrace
Stack trace:
java.lang.IllegalStateException
Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException
Caused by: java.lang.IllegalStateException
Expected Behaviour
test-app should honor all methods of port configuration supported by run-app
Actual Behaviour
Tries to bind to 8080, fails with an exception
Environment Information
|Grails Version: 3.1.5
|Groovy Version: 2.4.6
|JVM Version: 1.8.0_60
Example Application
The text was updated successfully, but these errors were encountered: