]
Jan Stourac commented on WFCORE-4323:
-------------------------------------
Note - Yeray has also prepared a test code update draft to address Undertow issues with
tasks stopping when server is shutdown/stopped:
Improve the suspend-timeout test cases
--------------------------------------
Key: WFCORE-4323
URL:
https://issues.jboss.org/browse/WFCORE-4323
Project: WildFly Core
Issue Type: Task
Components: Test Suite
Affects Versions: 8.0.0.Beta5
Reporter: Yeray Borges
Assignee: Jan Stourac
Priority: Major
Right now we are not covering all test cases available when we are using suspend-timeout
attributes for the server lifecycle operations.
Discussions about the existing test cases concluded that we should be using the following
strategy to test them effectively:
- A test case using suspend-timeout <0 -> We can unlock the web application
manually. That means test the SuspendController.listeners.complete () event path.
- A test case using suspend-timeout> 0 -> We should not unlock manually the web
application, and we should wait for the timeout, that means to test the
SuspendController.listeners.timeout () event path.
- A test case using suspend-timeout = 0 -> That could become a redundant bit with the
previous case because the event will be the SuspendController.listeners.timeout (), but we
will not be included in the test that the event is fired as a result of a TimerTask ().
In order to allow the inflight tasks being stopped in our test suite, we need to change
the way we are enabling Undertow in wildfly-core. Right now our
TestSuspendServiceActivator is activating Undertow without using the IO worker threads,
that means when the server is shutdown/stopped, the tasks created by Undertow are not
automatically terminated.