Fixed SchedulerTest.MetricsEndpoint test.

Review: https://reviews.apache.org/r/22089