users@jersey.java.net

[Jersey] Re: Speeding up jersey-test?

From: Gili <cowwoc_at_bbs.darktech.org>
Date: Fri, 8 Apr 2011 08:56:52 -0700 (PDT)

     Done: http://java.net/jira/browse/JERSEY-705

Gili

On 07/04/2011 11:01 AM, Pavel Bucek-2 [via Jersey] wrote:
> Hello Naresh and Gili,
>
> this would be nice feature, I had something implemented some time ago
> but I can't find it anymore. Feel free to file RFE for this so we
> won't forget it again.
>
> Pavel
>
> On 04/07/2011 07:09 AM, Srinivas Naresh Bhimisetty wrote:
>> Gili,
>>
>> as you observed, the JerseyTest starts and stops the test container
>> before (@Before) and after (@After) each test method is executed.
>> This sure could be the cause of the time being taken to execute each
>> test method.
>>
>> Probably, changing the JerseyTest implementation to start/stop the
>> test container only once (using the @BeforeClass, @AfterClass
>> annotations), for all the test methods defined in a test class should
>> help overcome this.
>>
>> - Naresh
>>
>> On Tue, Apr 5, 2011 at 12:18 AM, Gili <[hidden email]
>> </user/SendEmail.jtp?type=node&node=6250350&i=0&by-user=t>> wrote:
>>
>> Hi,
>>
>> Jersey-test is quite slow. Granted, the unit tests are doing a
>> lot (starting
>> up a web server, running the test and shutting down the web
>> server) but the
>> end-result is that each @Test takes a minimum of a second
>> compared with
>> milliseconds used by my other unit tests. I am using the Grizzly web
>> container.
>>
>> Is there a way to speed up these unit tests? How fast is
>> InMemoryTestContainer? I can't use it on my end because it
>> doesn't seem to
>> be compatible with Guice but I'm just curious how if it makes a big
>> difference.
>>
>> Thanks,
>> Gili
>>
>> --
>> View this message in context:
>> http://jersey.576304.n2.nabble.com/Speeding-up-jersey-test-tp6239607p6239607.html
>> <http://jersey.576304.n2.nabble.com/Speeding-up-jersey-test-tp6239607p6239607.html?by-user=t>
>> Sent from the Jersey mailing list archive at Nabble.com.
>>
>>
>
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the
> discussion below:
> http://jersey.576304.n2.nabble.com/Speeding-up-jersey-test-tp6239607p6250350.html
>
> To unsubscribe from Speeding up jersey-test?, click here
> <http://jersey.576304.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=6239607&code=Y293d29jQGJicy5kYXJrdGVjaC5vcmd8NjIzOTYwN3wxNTc0MzIxMjQ3>.
>



--
View this message in context: http://jersey.576304.n2.nabble.com/Speeding-up-jersey-test-tp6239607p6254276.html
Sent from the Jersey mailing list archive at Nabble.com.