javaee7-samples icon indicating copy to clipboard operation
javaee7-samples copied to clipboard

Test for programmatic-registration module is incorrect

Open orelgenya opened this issue 10 years ago • 1 comments

This test wrong at many points:

  • test returns before calling ParentServlet, which is responsible for ChildServlet registration;
  • webclient calls wrong URLs (/ is redundant and don't match with mappings);
  • mapping for ChildServlet isn't set (dynamically)
  • fail(..) statement prevents execution of meaningful part of the test;
  • and finally it wouldn't work because programmatic registration is impossible after ServletContext initialization is finished.

orelgenya avatar Sep 15 '15 13:09 orelgenya

Send a PR with the fix?

arun-gupta avatar Sep 15 '15 14:09 arun-gupta