Inclusion of try/finally suggested by Stian

This commit is contained in:
Bruno Oliveira 2016-04-22 08:23:05 -03:00
parent 30f34173c5
commit ec77970021

View file

@ -63,9 +63,12 @@ public class AssertEvents implements TestRule {
return new Statement() { return new Statement() {
@Override @Override
public void evaluate() throws Throwable { public void evaluate() throws Throwable {
base.evaluate(); try {
// TODO Test should fail if there are leftover events base.evaluate();
context.testingClient.testing().clearQueue(); } finally {
// TODO Test should fail if there are leftover events
context.testingClient.testing().clearQueue();
}
} }
}; };
} }