Open GoogleCodeExporter opened 8 years ago
That could work, I don't think there's any blocker on this.
Original comment by brice.du...@gmail.com
on 10 Sep 2012 at 11:27
On the other hand, it's adding a new method to the api where one can very
easily create his own timeout() method, import it statically, problem solved :)
Original comment by szcze...@gmail.com
on 18 Sep 2012 at 8:58
Agreed today IDEs can make this thing really easy. But if the mockito provided
this out of the box shouldn't it be better.
Original comment by brice.du...@gmail.com
on 19 Sep 2012 at 1:50
At the moment I'm not very keen on adding a public method like that to Mockito
type. Another reason is that we would have to use consistent api in other
places, too. For example, if we ever develop during(x) feature (issue 347) it
would also need an overload with TimeUnit. However, I might change my mind as
the TimeUnit is getting pretty standard these days and maybe an overloaded
method is not really that much of a big deal in terms of sprawling api.
We could add a new constructor to the Timeout type that uses the TimeUnits. I
have no problems with that :)
Original comment by szcze...@gmail.com
on 19 Sep 2012 at 2:48
Yes TimeUnit is somehow much more future prone, as it is used a lot in
conccurrency API. Also we don't have much methods related to time.
Anyway I agree that it's not yet a big deal, there's more urgent matter, and
probably more popular as well (such as the anys).
Original comment by brice.du...@gmail.com
on 19 Sep 2012 at 3:01
For now, TimeUnit.SECONDS.toMillis(2) can be used.
Original comment by szcze...@gmail.com
on 20 Apr 2014 at 9:14
Original issue reported on code.google.com by
Ash2kk@gmail.com
on 10 Sep 2012 at 11:09