add endTime variable for promeClient.Series api

Signed-off-by: 屈骏 <qujun@tiduyun.com>
This commit is contained in:
屈骏 2020-07-22 10:51:08 +08:00
parent 6e05ab938e
commit 5e169f5b0d
3 changed files with 6 additions and 3 deletions

View file

@ -87,7 +87,8 @@ var _ = Describe("Custom Metrics Provider", func() {
By("setting the acceptible interval to now until the next update, with a bit of wiggle room")
startTime := pmodel.Now().Add(-1*fakeProviderUpdateInterval - fakeProviderUpdateInterval/10)
fakeProm.AcceptableInterval = pmodel.Interval{Start: startTime, End: 0}
endTime := pmodel.Now().Add(1*fakeProviderUpdateInterval + fakeProviderUpdateInterval/10)
fakeProm.AcceptableInterval = pmodel.Interval{Start: startTime, End: endTime}
By("updating the list of available metrics")
// don't call RunUntil to avoid timing issue