From cdc69c62c4f6b60dc28e74e48a8b6ba68461ebc5 Mon Sep 17 00:00:00 2001
From: lorenz <stu203404@mail.uni-kiel.de>
Date: Sat, 13 Mar 2021 12:38:15 +0100
Subject: [PATCH] Cleanup RETRYS

---
 .../main/kotlin/theodolite/evaluation/ExternalSloChecker.kt   | 4 ++--
 .../src/main/kotlin/theodolite/evaluation/MetricFetcher.kt    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/ExternalSloChecker.kt b/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/ExternalSloChecker.kt
index b967d2d92..2de8e2dc9 100644
--- a/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/ExternalSloChecker.kt
+++ b/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/ExternalSloChecker.kt
@@ -16,7 +16,7 @@ class ExternalSloChecker(
 ) :
     SloChecker {
 
-    private val RETRYS = 2
+    private val RETRIES = 2
     private val TIMEOUT = 60.0
 
     override fun evaluate(start: Instant, end: Instant): Boolean {
@@ -26,7 +26,7 @@ class ExternalSloChecker(
         val data =
             Gson().toJson(mapOf("total_lag" to fetchedData.data?.result, "threshold" to threshold, "warmup" to warmup))
 
-        while (counter < RETRYS) {
+        while (counter < RETRIES) {
             val result = post(externalSlopeURL, data = data, timeout = TIMEOUT)
             if (result.statusCode != 200) {
                 counter++
diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/MetricFetcher.kt b/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/MetricFetcher.kt
index b828b0213..7dbaf568c 100644
--- a/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/MetricFetcher.kt
+++ b/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/MetricFetcher.kt
@@ -12,7 +12,7 @@ import java.time.Instant
 private val logger = KotlinLogging.logger {}
 
 class MetricFetcher(private val prometheusURL: String, private val offset: Duration) {
-    private val RETRYS = 2
+    private val RETRIES = 2
     private val TIMEOUT = 60.0
 
     fun fetchMetric(start: Instant, end: Instant, query: String): PrometheusResponse {
@@ -28,7 +28,7 @@ class MetricFetcher(private val prometheusURL: String, private val offset: Durat
             "step" to "5s"
         )
 
-        while (counter < RETRYS) {
+        while (counter < RETRIES) {
             val response = get("$prometheusURL/api/v1/query_range", params = parameter, timeout = TIMEOUT)
             if (response.statusCode != 200) {
                 val message = response.jsonObject.toString()
-- 
GitLab