rkhachatryan commented on a change in pull request #19222:
URL: https://github.com/apache/flink/pull/19222#discussion_r834215167
##########
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:
Moving the assertions after `close` requires the thread that finished
the upload to stop, i.e. it must have completed handling the upload and updated
the metrics.
--
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]