Skip to content

Commit 67bfe89

Browse files
committed
Populated the RequestId field of the LLMRequest in tests
Signed-off-by: Shmuel Kallner <[email protected]>
1 parent 7bbed6f commit 67bfe89

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

pkg/epp/scheduling/plugins/filter/filter_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"testing"
2222

2323
"github.com/google/go-cmp/cmp"
24+
"github.com/google/uuid"
2425
k8stypes "k8s.io/apimachinery/pkg/types"
2526
"sigs.k8s.io/gateway-api-inference-extension/pkg/epp/backend"
2627
backendmetrics "sigs.k8s.io/gateway-api-inference-extension/pkg/epp/backend/metrics"
@@ -221,6 +222,7 @@ func TestLoRASoftAffinityDistribution(t *testing.T) {
221222

222223
// Create a test request and pods
223224
req := &types.LLMRequest{
225+
RequestId: uuid.NewString(),
224226
Model: testAffinityModel,
225227
ResolvedTargetModel: testAffinityModel,
226228
}

pkg/epp/scheduling/scheduler_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"testing"
2222

2323
"github.com/google/go-cmp/cmp"
24+
"github.com/google/uuid"
2425
k8stypes "k8s.io/apimachinery/pkg/types"
2526
"sigs.k8s.io/gateway-api-inference-extension/pkg/epp/backend"
2627
backendmetrics "sigs.k8s.io/gateway-api-inference-extension/pkg/epp/backend/metrics" // Import config for thresholds
@@ -40,6 +41,7 @@ func TestSchedule(t *testing.T) {
4041
{
4142
name: "no pods in datastore",
4243
req: &types.LLMRequest{
44+
RequestId: uuid.NewString(),
4345
Model: "any-model",
4446
ResolvedTargetModel: "any-model",
4547
Critical: true,
@@ -50,6 +52,7 @@ func TestSchedule(t *testing.T) {
5052
{
5153
name: "critical request",
5254
req: &types.LLMRequest{
55+
RequestId: uuid.NewString(),
5356
Model: "critical",
5457
ResolvedTargetModel: "critical",
5558
Critical: true,
@@ -114,6 +117,7 @@ func TestSchedule(t *testing.T) {
114117
{
115118
name: "sheddable request, accepted",
116119
req: &types.LLMRequest{
120+
RequestId: uuid.NewString(),
117121
Model: "sheddable",
118122
ResolvedTargetModel: "sheddable",
119123
Critical: false,
@@ -177,6 +181,7 @@ func TestSchedule(t *testing.T) {
177181
{
178182
name: "sheddable request, dropped",
179183
req: &types.LLMRequest{
184+
RequestId: uuid.NewString(),
180185
Model: "sheddable",
181186
ResolvedTargetModel: "sheddable",
182187
Critical: false,
@@ -356,7 +361,9 @@ func TestSchedulePlugins(t *testing.T) {
356361
// Initialize the scheduler
357362
scheduler := NewSchedulerWithConfig(&fakeDataStore{pods: test.input}, &test.config)
358363

359-
req := &types.LLMRequest{Model: "test-model"}
364+
req := &types.LLMRequest{
365+
RequestId: uuid.NewString(),
366+
Model: "test-model"}
360367
got, err := scheduler.Schedule(context.Background(), req)
361368

362369
// Validate error state

0 commit comments

Comments
 (0)