Align tests for Jetty, Undertow, Tomcat and Karaf


Right now we duplicate all tests for Jetty, Undertow and Tomcat.
Some are also used with the Karaf Integration tests.
It would be good, to just write a test once and re-use that test for every container implementation.
The benefit is, we can make sure all container behave the same.
The downside, some containers don't behave the same. That needs to be addressed first.




Stephan Siano
November 30, 2017, 8:07 AM

I aligned the common integration tests for Jetty, Tomcat, and Undertow.

The common abstract test classes are in pax-web-itest-common.
If a test fails, that did not exist before for that container, I have set it to ignore (for that container). This affects three tests on Tomcat, one on Undertow, and one on Tomcat and Undertow.

Three tests on Undertow behave differently than on the other containers (Undertow returns 403 whereas Tomcat and Jetty return 404). The old tests reflected this, so I just overloaded that test methods for Undertow.

One test (for logging existed for all three containers, but was different, so I put that into the concrete class).

Things that could be done:
1. The tests that are specific to a single container are derived from the old ITestBase class specific to that container, not the new common ITestBase class, the abstract test classes are derived from. We might want to unify this (but it's a bit more than just replacing the parent class).
2. I have not touched the karaf test. They are derived from a superclass, which does some specific things, so in the moment I would probably propose to keep these tests as they are (there are also not too many test copies there and I guess the main purpose of these test is to actually test that the karaf features work.

Achim Nierbeck
December 3, 2017, 11:58 AM

Thanks a ton for taking care of this.
This is a great improvement.

Grzegorz Grzybek
December 5, 2017, 7:22 AM

Great work indeed! Thanks for that




Achim Nierbeck




Fix versions