use of com.google.common.testing.TearDown in project commons by twitter.
the class PartitionerTest method join.
private Partition join(Partitioner partitioner) throws JoinException, InterruptedException {
final Partition partition = partitioner.join();
addTearDown(new TearDown() {
@Override
public void tearDown() throws JoinException {
partition.cancel();
}
});
return partition;
}
Aggregations