[#343] Fixed test logs metrics #343

Merged
i.niyazov merged 1 commit from i.niyazov/frostfs-testcases:fixed-test-logs-metrics into master 2024-12-17 14:21:41 +00:00
Showing only changes of commit 22c6e9da35 - Show all commits

View file

@ -34,7 +34,9 @@ class TestLogsMetrics(ClusterTestBase):
current_time = datetime.now(timezone.utc)
counter_metrics = get_metrics_value(cluster_node, **metrics_greps)
counter_logs = self.get_count_logs_by_level(cluster_node, metrics_greps.get("level"), restart_time, current_time, log_priority)
assert counter_logs == counter_metrics, f"counter_logs: {counter_logs}, counter_metrics: {counter_metrics} in node: {cluster_node}"
assert counter_logs == pytest.approx(
counter_metrics, rel=0.02
), f"counter_logs: {counter_logs}, counter_metrics: {counter_metrics} in node: {cluster_node}"
@staticmethod
def get_count_logs_by_level(cluster_node: ClusterNode, log_level: str, after_time: datetime, until_time: datetime, log_priority: str):