javaee-samples/javaee7-samples

Test for programmatic-registration module is incorrect

orelgenya opened this issue · 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.

Send a PR with the fix?