Whatever you think is best. I'm fine following Steve's approach. Undertow starts up and shuts down pretty quick.

On Sun, Jan 15, 2017 at 5:32 PM, Stuart Douglas <sdouglas@redhat.com> wrote:
We do publish tests-jars, so you can actually use DefaultServer,
however I agree that this is not really ideal.

I think the ideal solution would be to take the core functionality
from DefaultServer and create a new repo (undertow-test-runner) and
create some kind of UndertowRunner class that is based on
DefaultServer. Does this sound reasonable?


Stuart

On Sun, Jan 15, 2017 at 7:22 AM, Bill O'Neil <bill@dartalley.com> wrote:
> Hello,
>
> How would you recommend testing custom HttpHanders? The DefaultServer class
> in core part of the test code so it is not included in the jar for reuse.
> Would it be reasonable to pull testing utils into their own project so it
> can be reused? Or would you recommend just mocking a HttpServerExchange and
> passing that to the HttpHandler?
>
> Thanks,
> Bill
>
> _______________________________________________
> undertow-dev mailing list
> undertow-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev