Remove duration from prometheus label

This commit is contained in:
Ming Deng
2020-12-26 21:11:04 +08:00
parent b0406f107a
commit 73d81bafd9
8 changed files with 18 additions and 12 deletions

View File

@@ -36,9 +36,11 @@ func TestParse(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, "0/30 * * * * *", tk.GetSpec(context.Background()))
m.AddTask("taska", tk)
m.StartTask()
time.Sleep(3 * time.Second)
assert.True(t, len(tk.GetStatus(context.Background())) == 0)
m.StopTask()
}