From d22ffdfa2ab2e692e41dbc8c2e6c4d25a79ee9cd Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Thu, 17 Sep 2020 10:39:25 +0200 Subject: [PATCH] metrics: Fix tests. * tests/metrics.scm ("builds-per-day", "new-derivations-per-day"): Fix tests results that were depending of the local time. ("evaluation-completion-speed"): Adapt to new unit. --- tests/metrics.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/metrics.scm b/tests/metrics.scm index dfe3728..48ee53a 100644 --- a/tests/metrics.scm +++ b/tests/metrics.scm @@ -94,7 +94,7 @@ nix_name, log, status, timestamp, starttime, stoptime) VALUES (db-get-metrics-with-id 'average-eval-duration-per-spec))) (test-equal "builds-per-day" - 2.0 + 1.0 (begin (db-update-metric 'builds-per-day) (db-get-metric 'builds-per-day yesterday))) @@ -106,7 +106,7 @@ nix_name, log, status, timestamp, starttime, stoptime) VALUES (db-get-metrics-with-id 'pending-builds))) (test-equal "new-derivations-per-day" - `((,yesterday . 2.0)) + `((,yesterday . 1.0)) (begin (db-update-metric 'new-derivations-per-day) (db-get-metrics-with-id 'new-derivations-per-day))) @@ -140,7 +140,7 @@ nix_name, log, status, timestamp, starttime, stoptime) VALUES (db-get-metrics-with-id 'average-eval-build-complete-time))) (test-equal "evaluation-completion-speed" - 15.0 + 900.0 (begin (db-update-metric 'evaluation-completion-speed 4) (db-get-metric 'evaluation-completion-speed 4)))