Skip to content

fix

fix #123

GitHub Actions / Monitoring integration test failed Sep 21, 2023 in 0s

1 fail, 6 pass in 2m 2s

7 tests  +7   6 ✔️ +6   2m 2s ⏱️ + 2m 2s
1 suites +1   0 💤 ±0 
1 files   +1   1 +1 

Results for commit 27429bf. ± Comparison against earlier commit 48bd76c.

Annotations

Check warning on line 0 in tests.test_exporter

See this annotation in the file changed.

@github-actions github-actions / Monitoring integration test

test_components_online (tests.test_exporter) failed

./pytest.xml [took 0s]
Raw output
assert 1 == 2
global_url = 'http://openmldb-exporter:8000/metrics'

    def test_components_online(global_url):
        # Make a request to your application to get the Prometheus metrics
        response = requests.get(global_url)
    
        # Parse the metrics from the response
        metrics = text_string_to_metric_families(response.text)
    
        ns_cnt = 0
        tb_cnt = 0
        # Assert that the metrics are as expected
        for metric in metrics:
            # all components online
            if metric.name == "openmldb_status":
                for sample in metric.samples:
                    if sample.value == 1.0:
                        if sample.labels["role"] == "nameserver":
                            ns_cnt += 1
                        elif sample.labels["role"] == "tablet":
                            tb_cnt += 1
    
                        assert sample.labels["openmldb_status"] == "online"
    
>       assert ns_cnt == 2
E       assert 1 == 2

tests/test_exporter.py:31: AssertionError