File tree Expand file tree Collapse file tree
.test-infra/metrics/src/test/groovy Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,12 +22,12 @@ import groovy.json.JsonSlurper
2222import static groovy.test.GroovyAssert.shouldFail
2323
2424/**
25- * Prober tests which performs health checks on deployed infrasture for
25+ * Prober tests which performs health checks on deployed infrastructure for
2626 * community metrics.
2727 */
2828class ProberTests {
2929 // TODO: Make this configurable
30- def grafanaEndpoint = ' http ://metrics.beam.apache.org'
30+ def grafanaEndpoint = ' https ://metrics.beam.apache.org'
3131
3232 @Test
3333 void PingGrafanaHttpApi () {
@@ -36,14 +36,14 @@ class ProberTests {
3636 def dashboardNames = allDashboards. title
3737 // Validate at least one expected dashboard exists
3838 assert dashboardNames. contains(' Post-commit Test Reliability' ) : ' Expected dashboard does not exist'
39- assert dashboardNames. size > 0 : " No dashboards found. Check Grafana dashboard initialization script."
39+ assert dashboardNames. size() > 0 : " No dashboards found. Check Grafana dashboard initialization script."
4040 }
4141
4242 @Test
4343 void CheckGrafanaStalenessAlerts () {
4444 def alertsJson = " ${ grafanaEndpoint} /api/alerts?dashboardQuery=Source%20Data%20Freshness" . toURL(). text
4545 def alerts = new JsonSlurper (). parseText(alertsJson)
46- assert alerts. size > 0
46+ assert alerts. size() > 0
4747 alerts. each { alert ->
4848 assert alert. state == ' ok' : " Input data is stale! ${ alert} \n See: ${ grafanaEndpoint} /d/data-freshness"
4949 }
You can’t perform that action at this time.
0 commit comments