@@ -126,7 +126,7 @@ func newUnitHarness(
126126 }
127127
128128 mockDetector := & mockSaturationDetector {}
129- mockPodLocator := & mocks.MockPodLocator {}
129+ mockEndpointCandidates := & mocks.MockEndpointCandidates {}
130130
131131 mockProcessorFactory := & mockShardProcessorFactory {
132132 processors : make (map [string ]* mockShardProcessor ),
@@ -144,7 +144,7 @@ func newUnitHarness(
144144 withClock (harnessOpts .clock ),
145145 withShardProcessorFactory (mockProcessorFactory .new ),
146146 }
147- fc , err := NewFlowController (ctx , "test-pool" , cfg , registry , mockDetector , mockPodLocator , usageLimitPolicy , fcOpts ... )
147+ fc , err := NewFlowController (ctx , "test-pool" , cfg , registry , mockDetector , mockEndpointCandidates , usageLimitPolicy , fcOpts ... )
148148 require .NoError (t , err , "failed to create FlowController for unit test harness" )
149149
150150 h := & testHarness {
@@ -167,7 +167,7 @@ func newUnitHarness(
167167func newIntegrationHarness (t * testing.T , ctx context.Context , cfg * Config , registry * mockRegistryClient ) * testHarness {
168168 t .Helper ()
169169 mockDetector := & mockSaturationDetector {}
170- mockPodLocator := & mocks.MockPodLocator {}
170+ mockEndpointCandidates := & mocks.MockEndpointCandidates {}
171171 usageLimitPolicy := usagelimits .DefaultPolicy ()
172172
173173 // Align FakeClock with system time. See explanation in newUnitHarness.
@@ -180,7 +180,7 @@ func newIntegrationHarness(t *testing.T, ctx context.Context, cfg *Config, regis
180180 withRegistryClient (registry ),
181181 withClock (mockClock ),
182182 }
183- fc , err := NewFlowController (ctx , "test-pool" , cfg , registry , mockDetector , mockPodLocator , usageLimitPolicy , opts ... )
183+ fc , err := NewFlowController (ctx , "test-pool" , cfg , registry , mockDetector , mockEndpointCandidates , usageLimitPolicy , opts ... )
184184 require .NoError (t , err , "failed to create FlowController for integration test harness" )
185185
186186 h := & testHarness {
@@ -290,7 +290,7 @@ func (f *mockShardProcessorFactory) new(
290290 _ context.Context , // The factory does not use the lifecycle context; it's passed to the processor's Run method later.
291291 shard contracts.RegistryShard ,
292292 _ flowcontrol.SaturationDetector ,
293- _ contracts.PodLocator ,
293+ _ contracts.EndpointCandidates ,
294294 _ flowcontrol.UsageLimitPolicy ,
295295 _ clock.WithTicker ,
296296 _ time.Duration ,
@@ -1155,7 +1155,7 @@ func TestFlowController_WorkerManagement(t *testing.T) {
11551155 ctx context.Context , // The context created by getOrStartWorker for the potential new processor.
11561156 shard contracts.RegistryShard ,
11571157 _ flowcontrol.SaturationDetector ,
1158- _ contracts.PodLocator ,
1158+ _ contracts.EndpointCandidates ,
11591159 _ flowcontrol.UsageLimitPolicy ,
11601160 _ clock.WithTicker ,
11611161 _ time.Duration ,
0 commit comments