@@ -156,35 +156,35 @@ public void testMetricsOnFileCreateRead() throws Exception {
156156 getBandwidthGaugeUpdater ().triggerUpdate (true );
157157 long bytesWritten = AzureMetricsTestUtil .getCurrentBytesWritten (getInstrumentation ());
158158 assertTrue (bytesWritten > (FILE_SIZE / 2 ) && bytesWritten < (FILE_SIZE * 2 ),
159- "The bytes written in the last second " + bytesWritten +
160- " is pretty far from the expected range of around " + FILE_SIZE +
161- " bytes plus a little overhead." );
159+ "The bytes written in the last second " + bytesWritten
160+ + " is pretty far from the expected range of around " + FILE_SIZE
161+ + " bytes plus a little overhead." );
162162 long totalBytesWritten = AzureMetricsTestUtil .getCurrentTotalBytesWritten (getInstrumentation ());
163163 assertTrue (totalBytesWritten >= FILE_SIZE && totalBytesWritten < (FILE_SIZE * 2 ),
164- "The total bytes written " + totalBytesWritten +
165- " is pretty far from the expected range of around " + FILE_SIZE +
166- " bytes plus a little overhead." );
164+ "The total bytes written " + totalBytesWritten
165+ + " is pretty far from the expected range of around " + FILE_SIZE
166+ + " bytes plus a little overhead." );
167167 long uploadRate = AzureMetricsTestUtil .getLongGaugeValue (getInstrumentation (), WASB_UPLOAD_RATE );
168168 LOG .info ("Upload rate: " + uploadRate + " bytes/second." );
169169 long expectedRate = (FILE_SIZE * 1000L ) / uploadDurationMs ;
170- assertTrue (uploadRate >= expectedRate , "The upload rate " + uploadRate +
171- " is below the expected range of around " + expectedRate +
172- " bytes/second that the unit test observed. This should never be" +
173- " the case since the test underestimates the rate by looking at " +
174- " end-to-end time instead of just block upload time." );
170+ assertTrue (uploadRate >= expectedRate , "The upload rate " + uploadRate
171+ + " is below the expected range of around " + expectedRate
172+ + " bytes/second that the unit test observed. This should never be"
173+ + " the case since the test underestimates the rate by looking at "
174+ + " end-to-end time instead of just block upload time." );
175175 long uploadLatency = AzureMetricsTestUtil .getLongGaugeValue (getInstrumentation (),
176176 WASB_UPLOAD_LATENCY );
177177 LOG .info ("Upload latency: {}" , uploadLatency );
178178 long expectedLatency = uploadDurationMs ; // We're uploading less than a block.
179179 assertTrue (uploadLatency > 0 ,
180- "The upload latency " + uploadLatency +
181- " should be greater than zero now that I've just uploaded a file." );
180+ "The upload latency " + uploadLatency
181+ + " should be greater than zero now that I've just uploaded a file." );
182182 assertTrue (uploadLatency <= expectedLatency ,
183- "The upload latency " + uploadLatency +
184- " is more than the expected range of around " + expectedLatency +
185- " milliseconds that the unit test observed. This should never be" +
186- " the case since the test overestimates the latency by looking at " +
187- " end-to-end time instead of just block upload time." );
183+ "The upload latency " + uploadLatency
184+ + " is more than the expected range of around " + expectedLatency
185+ + " milliseconds that the unit test observed. This should never be"
186+ + " the case since the test overestimates the latency by looking at "
187+ + " end-to-end time instead of just block upload time." );
188188
189189 // Read the file
190190 start = new Date ();
@@ -207,31 +207,31 @@ public void testMetricsOnFileCreateRead() throws Exception {
207207 assertEquals (FILE_SIZE , totalBytesRead );
208208 long bytesRead = AzureMetricsTestUtil .getCurrentBytesRead (getInstrumentation ());
209209 assertTrue (bytesRead > (FILE_SIZE / 2 ) && bytesRead < (FILE_SIZE * 2 ),
210- "The bytes read in the last second " + bytesRead +
211- " is pretty far from the expected range of around " + FILE_SIZE +
212- " bytes plus a little overhead." );
210+ "The bytes read in the last second " + bytesRead
211+ + " is pretty far from the expected range of around " + FILE_SIZE
212+ + " bytes plus a little overhead." );
213213 long downloadRate = AzureMetricsTestUtil .getLongGaugeValue (getInstrumentation (), WASB_DOWNLOAD_RATE );
214214 LOG .info ("Download rate: " + downloadRate + " bytes/second." );
215215 expectedRate = (FILE_SIZE * 1000L ) / downloadDurationMs ;
216216 assertTrue (downloadRate >= expectedRate ,
217- "The download rate " + downloadRate +
218- " is below the expected range of around " + expectedRate +
219- " bytes/second that the unit test observed. This should never be" +
220- " the case since the test underestimates the rate by looking at " +
221- " end-to-end time instead of just block download time." );
217+ "The download rate " + downloadRate
218+ + " is below the expected range of around " + expectedRate
219+ + " bytes/second that the unit test observed. This should never be"
220+ + " the case since the test underestimates the rate by looking at "
221+ + " end-to-end time instead of just block download time." );
222222 long downloadLatency = AzureMetricsTestUtil .getLongGaugeValue (getInstrumentation (),
223223 WASB_DOWNLOAD_LATENCY );
224224 LOG .info ("Download latency: " + downloadLatency );
225225 expectedLatency = downloadDurationMs ; // We're downloading less than a block.
226226 assertTrue (downloadLatency > 0 ,
227- "The download latency " + downloadLatency +
228- " should be greater than zero now that I've just downloaded a file." );
227+ "The download latency " + downloadLatency
228+ + " should be greater than zero now that I've just downloaded a file." );
229229 assertTrue (downloadLatency <= expectedLatency ,
230- "The download latency " + downloadLatency +
231- " is more than the expected range of around " + expectedLatency +
232- " milliseconds that the unit test observed. This should never be" +
233- " the case since the test overestimates the latency by looking at " +
234- " end-to-end time instead of just block download time." );
230+ "The download latency " + downloadLatency
231+ + " is more than the expected range of around " + expectedLatency
232+ + " milliseconds that the unit test observed. This should never be"
233+ + " the case since the test overestimates the latency by looking at "
234+ + " end-to-end time instead of just block download time." );
235235
236236 assertNoErrors ();
237237 }
@@ -265,17 +265,17 @@ public void testMetricsOnBigFileCreateRead() throws Exception {
265265 getBandwidthGaugeUpdater ().triggerUpdate (true );
266266 long totalBytesWritten = AzureMetricsTestUtil .getCurrentTotalBytesWritten (getInstrumentation ());
267267 assertTrue (totalBytesWritten >= FILE_SIZE && totalBytesWritten < (FILE_SIZE * 2 ),
268- "The total bytes written " + totalBytesWritten +
269- " is pretty far from the expected range of around " + FILE_SIZE +
270- " bytes plus a little overhead." );
268+ "The total bytes written " + totalBytesWritten
269+ + " is pretty far from the expected range of around " + FILE_SIZE
270+ + " bytes plus a little overhead." );
271271 long uploadRate = AzureMetricsTestUtil .getLongGaugeValue (getInstrumentation (), WASB_UPLOAD_RATE );
272272 LOG .info ("Upload rate: " + uploadRate + " bytes/second." );
273273 long uploadLatency = AzureMetricsTestUtil .getLongGaugeValue (getInstrumentation (),
274274 WASB_UPLOAD_LATENCY );
275275 LOG .info ("Upload latency: " + uploadLatency );
276276 assertTrue (uploadLatency > 0 ,
277- "The upload latency " + uploadLatency +
278- " should be greater than zero now that I've just uploaded a file." );
277+ "The upload latency " + uploadLatency
278+ + " should be greater than zero now that I've just uploaded a file." );
279279
280280 // Read the file
281281 InputStream inputStream = getFileSystem ().open (filePath );
@@ -300,8 +300,8 @@ public void testMetricsOnBigFileCreateRead() throws Exception {
300300 WASB_DOWNLOAD_LATENCY );
301301 LOG .info ("Download latency: " + downloadLatency );
302302 assertTrue (downloadLatency > 0 ,
303- "The download latency " + downloadLatency +
304- " should be greater than zero now that I've just downloaded a file." );
303+ "The download latency " + downloadLatency
304+ + " should be greater than zero now that I've just downloaded a file." );
305305 }
306306
307307 @ Test
@@ -481,9 +481,8 @@ private long assertWebResponsesInRange(long base,
481481 long inclusiveUpperLimit ) {
482482 long currentResponses = getCurrentWebResponses ();
483483 long justOperation = currentResponses - base ;
484- assertTrue (justOperation >= inclusiveLowerLimit &&
485- justOperation <= inclusiveUpperLimit , String .format (
486- "Web responses expected in range [%d, %d], but was %d." ,
484+ assertTrue (justOperation >= inclusiveLowerLimit && justOperation <= inclusiveUpperLimit ,
485+ String .format ("Web responses expected in range [%d, %d], but was %d." ,
487486 inclusiveLowerLimit , inclusiveUpperLimit , justOperation ));
488487 return currentResponses ;
489488 }
0 commit comments