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:
parent
03ae6100cd
commit
b169f35643
1 changed files with 1 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue