Repository: mesos Updated Branches: refs/heads/master 628ccd235 -> fa29544c3
Removed side-effects from MetricsTest.SnapshotAuthenticationEnabled. The test was previously adding metrics without removing them, which meant that the test fails when run in repetition. Since this test only cares about authentication, we can simply remove the metrics from the test entirely. Review: https://reviews.apache.org/r/47090 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/40a5b235 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/40a5b235 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/40a5b235 Branch: refs/heads/master Commit: 40a5b235e9cab47b7ae1f44ca1beb65d4536332b Parents: 628ccd2 Author: Benjamin Mahler <bmah...@apache.org> Authored: Sat May 7 15:04:47 2016 -0700 Committer: Benjamin Mahler <bmah...@apache.org> Committed: Mon May 9 17:25:29 2016 -0700 ---------------------------------------------------------------------- 3rdparty/libprocess/src/tests/metrics_tests.cpp | 16 ---------------- 1 file changed, 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/40a5b235/3rdparty/libprocess/src/tests/metrics_tests.cpp ---------------------------------------------------------------------- diff --git a/3rdparty/libprocess/src/tests/metrics_tests.cpp b/3rdparty/libprocess/src/tests/metrics_tests.cpp index 1cda7b4..5a82f4f 100644 --- a/3rdparty/libprocess/src/tests/metrics_tests.cpp +++ b/3rdparty/libprocess/src/tests/metrics_tests.cpp @@ -518,26 +518,10 @@ TEST_F(MetricsTest, SnapshotAuthenticationEnabled) Clock::pause(); - // Add a gauge and a counter. - GaugeProcess process; - PID<GaugeProcess> pid = spawn(&process); - ASSERT_TRUE(pid); - - Gauge gauge("test/gauge", defer(pid, &GaugeProcess::get)); - Gauge gaugeFail("test/gauge_fail", defer(pid, &GaugeProcess::fail)); - Counter counter("test/counter"); - - AWAIT_READY(metrics::add(gauge)); - AWAIT_READY(metrics::add(gaugeFail)); - AWAIT_READY(metrics::add(counter)); - // Advance the clock to avoid rate limit. Clock::advance(Seconds(1)); // A request with no authentication header. Future<Response> response = http::get(upid, "snapshot"); AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response); - - terminate(process); - wait(process); }