users@jersey.java.net

[Jersey] Re: Running parallel unit tests under Jersey 1

From: Joe Mocker <jmocker_at_Tremorvideo.com>
Date: Wed, 19 Mar 2014 15:16:08 +0000

I had written a ContainerFactory for JerseyTest to configure an in-memory Jetty instance a while ago to work around some broken pieces of JerseyTest too,

        https://github.com/creechy/jetty-jerseytest-container

I like the idea of punting JerseyTest, too, now that I look back at it, there’s not a heck of a lot of value-add compared to all its issues.

  —joe

On Mar 19, 2014, at 12:30 AM, Vetle Leinonen-Roeim <vetle_at_roeim.net> wrote:

> On 18.03.14 23:20, cowwoc wrote:
>> Hi,
>>
>> I just wanted to let you guys know that I managed to get run Jersey unit
>> tests in parallel using TestNG in "methods=parallel" mode, launching a
>> separate Jetty instance per @Test. My unit tests now complete 2x faster.
>> I don't know about you, but for me that is a very big deal.
>
> Awesome!
>
>> My advice to you: dump JerseyTest. Its design is flawed and it doesn't
>> look like it'll get fixed anytime soon. You can replace Jetty with your
>> server of choice. Just dump the abstraction (JerseyTest) and talk
>> directly to the server.
>
> Have you tried Jersey 2? As long as you don't need the servlet API, you can use an in-memory container when running JerseyTest, and blast away. It's really neat.
>
> [...]
>
> Regards,
> Vetle
>