private String blockIdEncoded(int blockNum) {
    String blockId = String.format("%05d", blockNum);
    return Base64.getEncoder().encodeToString(blockId.getBytes());
  }
Test to ensure that flush timeout is respected even if the block upload to azure is stuck/ taking longer than flush timeout
a countdown latch is used to mimic the upload to azure stuck
if flush timeout is respected then an exception is thrown when the flushtimeout_ms duration expires
else if timeout is not respected (aka bug is not fixed) then no exception is thrown and test hangs
In this test, the flush timeout is chosen to be 10 milliseconds, at the end of which, an AzureException of upload failed is thrown.
@throws Exception
@throws InterruptedException
samza-azure/src/test/java/org/apache/samza/system/azureblob/avro/TestAzureBlobOutputStream.java