@@ -770,99 +770,6 @@ var _ = ginkgo.Describe("Run end to end tests", ginkgo.Ordered, func() {
770770 })
771771 })
772772
773- ginkgo .When ("Running multimodal cache-affinity configuration" , ginkgo .Label (extendedTestLabel ), func () {
774- ginkgo .It ("should route identical multimodal content to the same decode pod" , func () {
775- infPoolObjects = createInferencePool (1 , true )
776-
777- decodeReplicas := 2
778- modelServers := createModelServersDecode (decodeReplicas )
779- epp := createEndPointPicker (mmCacheAffinityConfig )
780-
781- _ , decodePods := getModelServerPods (podSelector , prefillSelector , decodeSelector )
782- gomega .Expect (decodePods ).Should (gomega .HaveLen (decodeReplicas ))
783-
784- for _ , tc := range []struct {
785- name string
786- send func () (string , string )
787- }{
788- {"image" , func () (string , string ) { return runChatCompletionWithImages (testImageURL ) }},
789- {"audio" , runChatCompletionWithAudio },
790- {"video" , runChatCompletionWithVideo },
791- } {
792- ginkgo .By ("modality=" + tc .name )
793-
794- ns1 , pod1 := tc .send ()
795- gomega .Expect (ns1 ).Should (gomega .Equal (nsName ))
796- gomega .Expect (pod1 ).Should (gomega .BeElementOf (decodePods ))
797-
798- ns2 , pod2 := tc .send ()
799- gomega .Expect (ns2 ).Should (gomega .Equal (nsName ))
800- gomega .Expect (pod2 ).Should (gomega .Equal (pod1 ))
801- }
802-
803- // A/B symmetry: each content key independently routes back to its
804- // first-served pod. Catches "first request wins forever" bugs that
805- // the same-content loop above can't distinguish.
806- ginkgo .By ("A/B image symmetry" )
807- _ , podA := runChatCompletionWithImages (testImageURL )
808- _ , podB := runChatCompletionWithImages (testImageURL2 )
809- _ , podARe := runChatCompletionWithImages (testImageURL )
810- gomega .Expect (podARe ).Should (gomega .Equal (podA ))
811- _ , podBRe := runChatCompletionWithImages (testImageURL2 )
812- gomega .Expect (podBRe ).Should (gomega .Equal (podB ))
813-
814- // Mixed image + audio + video in one request. Probes per-item match
815- // accounting and the empty-hash short-circuit in ExtractMMItems.
816- ginkgo .By ("mixed image+audio+video cache affinity" )
817- _ , podMix := runChatCompletionWithImageAudioVideo (testImageURL , testAudioData , testVideoURL )
818- _ , podMixRe := runChatCompletionWithImageAudioVideo (testImageURL , testAudioData , testVideoURL )
819- gomega .Expect (podMixRe ).Should (gomega .Equal (podMix ))
820-
821- // hits is the matched subset of queries, so hits < queries (never equal).
822- // PreRequest writes the LRU async (wg.Go) → Eventually.
823- ginkgo .By ("metrics: hits_total + queries_total" )
824- gomega .Eventually (func () float64 {
825- return getMetricValue ("llm_d_router_epp_encoder_cache_queries_total" ,
826- map [string ]string {"modality" : "image" })
827- }, 5 * time .Second , 250 * time .Millisecond ).Should (gomega .BeNumerically (">=" , 1 ))
828- gomega .Eventually (func () float64 {
829- return getMetricValue ("llm_d_router_epp_encoder_cache_hits_total" ,
830- map [string ]string {"modality" : "image" })
831- }, 5 * time .Second , 250 * time .Millisecond ).Should (gomega .BeNumerically (">=" , 1 ))
832-
833- testutils .DeleteObjects (testConfig , epp )
834- testutils .DeleteObjects (testConfig , modelServers )
835- })
836-
837- // Estimate token-producer: encoder-cache metrics must be labelled per
838- // modality, not folded into "image" (#1617). Depends on the fix in #1618.
839- ginkgo .It ("should label per-modality metrics with the estimate token-producer" , func () {
840- infPoolObjects = createInferencePool (1 , true )
841-
842- decodeReplicas := 2
843- modelServers := createModelServersDecode (decodeReplicas )
844- epp := createEndPointPicker (mmCacheAffinityEstimateConfig )
845-
846- _ , decodePods := getModelServerPods (podSelector , prefillSelector , decodeSelector )
847- gomega .Expect (decodePods ).Should (gomega .HaveLen (decodeReplicas ))
848-
849- // One request per modality so each is recorded by the producer.
850- runChatCompletionWithImages (testImageURL )
851- runChatCompletionWithAudio ()
852- runChatCompletionWithVideo ()
853-
854- for _ , modality := range []string {"image" , "audio" , "video" } {
855- gomega .Eventually (func () float64 {
856- return getMetricValue ("llm_d_router_epp_encoder_cache_queries_total" ,
857- map [string ]string {"modality" : modality })
858- }, 5 * time .Second , 250 * time .Millisecond ).Should (gomega .BeNumerically (">=" , 1 ), "modality=%s" , modality )
859- }
860-
861- testutils .DeleteObjects (testConfig , epp )
862- testutils .DeleteObjects (testConfig , modelServers )
863- })
864- })
865-
866773 ginkgo .When ("Running simple non-PD KV enabled configuration" , ginkgo .Label (extendedTestLabel ), func () {
867774 ginkgo .It ("should run successfully" , func () {
868775 infPoolObjects = createInferencePool (1 , true )
0 commit comments