fix error handling in TestKit.within

restore outer deadline in case the code block does throw an exception.
This is done in order to reduce the number of follow-on test failures.
This commit is contained in:
Roland Kuhn 2011-03-27 18:15:40 +02:00
parent 03ae6100cd
commit b169f35643

View file

@ -157,7 +157,7 @@ trait TestKit {
val prev_end = end
end = start + max_diff
val ret = f
val ret = try f finally end = prev_end
val diff = now - start
assert (min <= diff, "block took "+format(min.unit, diff)+", should at least have been "+min)
@ -170,7 +170,6 @@ trait TestKit {
lastSoftTimeout -= 5.millis
}
end = prev_end
ret
}