Time out with async

84 views
Skip to first unread message

Jochen Mader

unread,
Jul 3, 2015, 11:24:45 AM7/3/15
to ve...@googlegroups.com
I am using Async async = context.async(); (with the VertxUnitRunner) and I can't seem to figure out how to change the timeout for async.
I need it for testing failure scenarios and I don't want to wait the default of 2 minutes ;)

--
Jochen Mader | Lead IT Consultant

codecentric AG | Elsenheimerstr. 55a | 80687 München | Deutschland
tel: +49 89 215486633 | fax: +49 89 215486699 | mobil: +49 152 51862390
www.codecentric.de | blog.codecentric.de | www.meettheexperts.de | www.more4fi.de

Sitz der Gesellschaft: Düsseldorf | HRB 63043 | Amtsgericht Düsseldorf
Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen Schütz

Julien Viet

unread,
Jul 3, 2015, 11:45:52 AM7/3/15
to ve...@googlegroups.com, Jochen Mader
right, that’s actually something we forgot and could make configured by the @Test annotation.

I will address this in the project at least.

I think in the meantime you can configure the runner to kill the process after some time at least in surefire.

-- 
Julien Viet
www.julienviet.com
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Julien Viet

unread,
Jul 3, 2015, 12:32:45 PM7/3/15
to ve...@googlegroups.com, Jochen Mader
I just made a PR for Vert.x Unit for this :


-- 
Julien Viet
www.julienviet.com

On 3 Jul 2015 at 17:24:45, Jochen Mader (jochen...@codecentric.de) wrote:

Jochen Mader

unread,
Jul 3, 2015, 12:36:47 PM7/3/15
to Julien Viet, ve...@googlegroups.com
Ok, good to know.
I'll simply won't port my tests from VertxTestBase for now.

Jochen Mader

unread,
Jul 3, 2015, 12:40:07 PM7/3/15
to Julien Viet, ve...@googlegroups.com
Hmm, but wouldn't it be better to define the timeout when creating the async?
I got some integration tests with multiple timeouts to test some recovery functionality.

Julien Viet

unread,
Jul 3, 2015, 12:46:11 PM7/3/15
to Jochen Mader, ve...@googlegroups.com
ok, this make sense too, the timeout would setup a timer that fails the context when it fires.


that being said global timeout configuration is something useful too :-)

-- 
Julien Viet
www.julienviet.com

Jochen Mader

unread,
Jul 3, 2015, 2:55:04 PM7/3/15
to Julien Viet, ve...@googlegroups.com
I subscribed to the ticket, will test it as soon at is in.
The global time out is a good thing and will be the solution for most problems.
It's just that I am a special butterfly and need special things ;)
Have a nice weekend.
Reply all
Reply to author
Forward
0 new messages