curcur commented on a change in pull request #19222:
URL: https://github.com/apache/flink/pull/19222#discussion_r834206728



##########
File path: 
flink-dstl/flink-dstl-dfs/src/test/java/org/apache/flink/changelog/fs/ChangelogStorageMetricsTest.java
##########
@@ -204,12 +204,12 @@ void testAttemptsPerUpload() throws Exception {
                 writer.append(0, new byte[] {0, 1, 2, 3});
                 writer.persist(from).get();
             }
-            HistogramStatistics histogram = 
metrics.getAttemptsPerUpload().getStatistics();
-            assertThat(histogram.getMin()).isEqualTo(maxAttempts);
-            assertThat(histogram.getMax()).isEqualTo(maxAttempts);
         } finally {
             storage.close();
         }
+        HistogramStatistics histogram = 
metrics.getAttemptsPerUpload().getStatistics();
+        assertThat(histogram.getMin()).isEqualTo(maxAttempts);
+        assertThat(histogram.getMax()).isEqualTo(maxAttempts);

Review comment:
       Would you please explain why moving the assert out can make sure that
   
   the histogram is **guaranteed** updated?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to