Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions pkg/llm-d-inference-sim/worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,12 +411,14 @@ var _ = Describe("Simulator requests scheduling", Ordered, func() {

// We sent 2500 requests, after about 2.5 seconds
// number of running requests should be 1000
// and the number of waiting requests should be less than 1000
// and the number of waiting requests should be less than 1000.
// Since we are in the middle of requests scheduling,
// the number of running requests can be 999.
runningStr = findMetric(metrics, runningMetric)
Expect(runningStr).NotTo(Equal(""))
running, err = strconv.Atoi(runningStr)
Expect(err).NotTo(HaveOccurred())
Expect(running).To(Equal(1000))
Expect(running).To(Or(Equal(1000), Equal(999)))
waitingStr = findMetric(metrics, waitingMetric)
waiting, err = strconv.Atoi(waitingStr)
Expect(err).NotTo(HaveOccurred())
Expand All @@ -431,13 +433,15 @@ var _ = Describe("Simulator requests scheduling", Ordered, func() {
Expect(err).NotTo(HaveOccurred())
metrics = strings.Split(string(data), "\n")

// number of running requests should be 1000
// and the number of waiting requests should be less than 1000
// The number of running requests should be 1000
// and the number of waiting requests should be less than 1000.
// Since we are in the middle of requests scheduling,
// the number of running requests can be 999.
runningStr = findMetric(metrics, runningMetric)
Expect(runningStr).NotTo(Equal(""))
running, err = strconv.Atoi(runningStr)
Expect(err).NotTo(HaveOccurred())
Expect(running).To(Equal(1000))
Expect(running).To(Or(Equal(1000), Equal(999)))
waitingStr = findMetric(metrics, waitingMetric)
waiting, err = strconv.Atoi(waitingStr)
Expect(err).NotTo(HaveOccurred())
Expand Down