MESOS-1433 This test is disabled as the pull-gauges that are used for these metrics may return Failures. In this case we do not put the metric into the endpoint. This has been observed specifically for the memory metrics. If in the future we put the error message from the Failure in the endpoint, or the memory metric is always available, we should reenable this test.
| 37 | // in the endpoint, or the memory metric is always available, we |
| 38 | // should reenable this test. |
| 39 | TEST(SystemTest, DISABLED_Metrics) |
| 40 | { |
| 41 | Future<http::Response> response = |
| 42 | http::get(process::metrics::internal::metrics, "snapshot"); |
| 43 | |
| 44 | AWAIT_READY(response); |
| 45 | |
| 46 | EXPECT_SOME_EQ("application/json", response->headers.get("Content-Type")); |
| 47 | |
| 48 | Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body); |
| 49 | ASSERT_SOME(parse); |
| 50 | |
| 51 | JSON::Object stats = parse.get(); |
| 52 | |
| 53 | EXPECT_EQ(1u, stats.values.count("system/load_1min")); |
| 54 | EXPECT_EQ(1u, stats.values.count("system/load_5min")); |
| 55 | EXPECT_EQ(1u, stats.values.count("system/load_15min")); |
| 56 | EXPECT_EQ(1u, stats.values.count("system/cpus_total")); |
| 57 | EXPECT_EQ(1u, stats.values.count("system/mem_total_bytes")); |
| 58 | EXPECT_EQ(1u, stats.values.count("system/mem_free_bytes")); |
| 59 | } |