1616import com .azure .storage .common .implementation .structuredmessage .StorageChecksumAlgorithm ;
1717import com .azure .storage .common .test .shared .extensions .LiveOnly ;
1818import org .junit .jupiter .api .BeforeEach ;
19+ import org .junit .jupiter .api .Disabled ;
1920import org .junit .jupiter .api .Test ;
2021import reactor .core .publisher .Flux ;
2122
3132import static org .junit .jupiter .api .Assertions .assertEquals ;
3233import static org .junit .jupiter .api .Assertions .assertNotNull ;
3334import static org .junit .jupiter .api .Assertions .assertNull ;
34- import static org .junit .jupiter .api .Assertions .assertTrue ;
3535
3636@ LiveOnly
3737public class BlobMessageEncoderUploadTests extends BlobTestBase {
@@ -89,7 +89,8 @@ public void uploadBinaryDataChunkedStructMess() {
8989 }
9090
9191 @ Test
92- public void uploadBinaryDataChunkedStructMessProgressListener () {
92+ @ Disabled
93+ public void uploadBinaryDataChunkedStructMessProgressListenerBehavior () {
9394 long size = Constants .MB * 10 ;
9495 byte [] data = getRandomByteArray ((int ) size );
9596 long blockSize = (long ) Constants .MB * 2 ;
@@ -115,12 +116,21 @@ public void uploadBinaryDataChunkedStructMessProgressListener() {
115116 bc .uploadWithResponse (optionsChecksum , null , Context .NONE );
116117 bc .uploadWithResponse (optionsNoChecksum , null , Context .NONE );
117118
118- assertTrue (uploadListenerChecksum .getReportingCount () >= (size / blockSize ));
119- assertTrue (uploadListenerNoChecksum .getReportingCount () >= (size / blockSize ));
120-
121119 System .out .println (
122- uploadListenerChecksum .getReportingCount () + " " + uploadListenerChecksum .getReportedByteCount () + " "
123- + uploadListenerNoChecksum .getReportingCount () + " " + uploadListenerNoChecksum .getReportedByteCount ());
120+ "checksum reporting count: " + uploadListenerChecksum .getReportingCount () + "\n "
121+ + "checksum byte count: " + uploadListenerChecksum .getReportedByteCount () + "\n "
122+ + "no checksum reporting count: " + uploadListenerNoChecksum .getReportingCount () + "\n "
123+ + "no checksum byte count: " + uploadListenerNoChecksum .getReportedByteCount ());
124+
125+ /*
126+ result:
127+ checksum reporting count: 15
128+ checksum byte count: 10485955
129+ no checksum reporting count: 15
130+ no checksum byte count: 10485760
131+
132+ progress listener reports the encoded byte count
133+ */
124134 }
125135
126136 @ Test
0 commit comments