Inclusion of try/finally suggested by Stian
This commit is contained in:
parent
30f34173c5
commit
ec77970021
1 changed files with 6 additions and 3 deletions
|
@ -63,10 +63,13 @@ public class AssertEvents implements TestRule {
|
||||||
return new Statement() {
|
return new Statement() {
|
||||||
@Override
|
@Override
|
||||||
public void evaluate() throws Throwable {
|
public void evaluate() throws Throwable {
|
||||||
|
try {
|
||||||
base.evaluate();
|
base.evaluate();
|
||||||
|
} finally {
|
||||||
// TODO Test should fail if there are leftover events
|
// TODO Test should fail if there are leftover events
|
||||||
context.testingClient.testing().clearQueue();
|
context.testingClient.testing().clearQueue();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue