ivanzlenko commented on code in PR #7269:
URL: https://github.com/apache/ignite-3/pull/7269#discussion_r2639455136
##########
modules/partition-replicator/src/test/java/org/apache/ignite/internal/partition/replicator/raft/snapshot/incoming/IncomingSnapshotCopierTest.java:
##########
@@ -840,4 +950,46 @@ private static void assertThatTargetStoragesAreEmpty(
private static UUID generateTxId() {
return TransactionIds.transactionId(CLOCK.now(), 1);
}
+
+ private static Metric
retrieveOutgoingSnapshotMetric(RaftSnapshotsMetricsSource
snapshotsMetricsSource, String metricName) {
+ return stream(snapshotsMetricsSource.holder().metrics().spliterator(),
false)
+ .filter(metric -> metricName.equals(metric.name()))
+ .findAny()
+ .get();
+ }
+
+ private static void assertThatMetricHasValue(
+ RaftSnapshotsMetricsSource snapshotsMetricsSource,
+ String metricName,
+ String expectedValue
+ ) {
+ Metric metric = retrieveOutgoingSnapshotMetric(snapshotsMetricsSource,
metricName);
+
+ Awaitility.await().until(metric::getValueAsString, is(expectedValue));
Review Comment:
Yup
--
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]