use of io.crate.blob.BlobTransferStatus in project crate by crate.
the class BlobHttpIntegrationTest method assertNoActiveTransfersRemaining.
@After
public void assertNoActiveTransfersRemaining() throws Exception {
Iterable<BlobTransferTarget> transferTargets = internalCluster().getInstances(BlobTransferTarget.class);
final Field activeTransfersField = BlobTransferTarget.class.getDeclaredField("activeTransfers");
activeTransfersField.setAccessible(true);
assertBusy(() -> {
for (BlobTransferTarget transferTarget : transferTargets) {
Map<UUID, BlobTransferStatus> activeTransfers = null;
try {
activeTransfers = (Map<UUID, BlobTransferStatus>) activeTransfersField.get(transferTarget);
assertThat(activeTransfers.keySet(), empty());
} catch (IllegalAccessException e) {
throw Throwables.propagate(e);
}
}
});
}
Aggregations