@@ -31,6 +31,7 @@ func TestHandleSubscriptionAlreadyClosed(t *testing.T) {
3131 message.Metadata {Runner : "demo" , Message : "demo" },
3232 ch ,
3333 func (_ message.Update [string , any ], _ chan error ) { calls ++ },
34+ nil ,
3435 )
3536 require .Equal (t , 0 , calls )
3637}
@@ -60,6 +61,7 @@ func TestPanicInSubscriptionHandler(t *testing.T) {
6061 numCalls ++
6162 panic ("oops " + update .Key )
6263 },
64+ nil ,
6365 )
6466 require .Equal (t , 2 , numCalls )
6567}
@@ -93,6 +95,7 @@ func TestHandleSubscriptionAlreadyInitialized(t *testing.T) {
9395 storeCalls ++
9496 }
9597 },
98+ nil ,
9699 )
97100 require .LessOrEqual (t , storeCalls , 2 ) // updates can be coalesced
98101 require .Equal (t , 1 , deleteCalls )
@@ -283,7 +286,9 @@ func TestControllerResourceUpdate(t *testing.T) {
283286 if u .Key == "end" {
284287 m .GatewayAPIResources .Close ()
285288 }
286- })
289+ },
290+ nil ,
291+ )
287292 if tc .updates > 1 {
288293 require .LessOrEqual (t , updates , tc .updates ) // Updates can be coalesced
289294 } else {
@@ -315,14 +320,14 @@ func TestHandleSubscriptionDebounceQuietPeriod(t *testing.T) {
315320 }()
316321
317322 var updates []any
318- message .HandleSubscriptionWithDebounce (
323+ message .HandleSubscription (
319324 logging .NewLogger (t .Output (), egv1a1 .DefaultEnvoyGatewayLogging ()),
320325 message.Metadata {Runner : "demo" , Message : "demo" },
321326 sub ,
322327 func (update message.Update [string , any ], _ chan error ) {
323328 updates = append (updates , update .Value )
324329 },
325- message.DebounceOptions {After : 200 * time .Millisecond , Max : 10 * time .Second },
330+ & message.DebounceOptions {After : 200 * time .Millisecond , Max : 10 * time .Second },
326331 )
327332
328333 // Without debouncing this burst yields up to 10 calls; with it the batch is
@@ -363,7 +368,7 @@ func TestHandleSubscriptionDebounceMaxDelay(t *testing.T) {
363368 start := time .Now ()
364369
365370 var updates int
366- message .HandleSubscriptionWithDebounce (
371+ message .HandleSubscription (
367372 logging .NewLogger (t .Output (), egv1a1 .DefaultEnvoyGatewayLogging ()),
368373 message.Metadata {Runner : "demo" , Message : "demo" },
369374 m .Subscribe (context .Background ()),
@@ -375,7 +380,7 @@ func TestHandleSubscriptionDebounceMaxDelay(t *testing.T) {
375380 }
376381 },
377382 // Quiet period far longer than the store interval, so only max can flush.
378- message.DebounceOptions {After : time .Hour , Max : 200 * time .Millisecond },
383+ & message.DebounceOptions {After : time .Hour , Max : 200 * time .Millisecond },
379384 )
380385
381386 require .NotZero (t , updates , "max delay should have forced at least one flush" )
@@ -399,14 +404,14 @@ func TestHandleSubscriptionDebounceFlushesOnClose(t *testing.T) {
399404 }()
400405
401406 var updates []message.Update [string , any ]
402- message .HandleSubscriptionWithDebounce (
407+ message .HandleSubscription (
403408 logging .NewLogger (t .Output (), egv1a1 .DefaultEnvoyGatewayLogging ()),
404409 message.Metadata {Runner : "demo" , Message : "demo" },
405410 m .Subscribe (context .Background ()),
406411 func (update message.Update [string , any ], _ chan error ) {
407412 updates = append (updates , update )
408413 },
409- message.DebounceOptions {After : 30 * time .Second , Max : time .Hour },
414+ & message.DebounceOptions {After : 30 * time .Second , Max : time .Hour },
410415 )
411416
412417 require .Len (t , updates , 1 )
@@ -437,7 +442,7 @@ func TestHandleSubscriptionDebounceCoalescesAcrossKeys(t *testing.T) {
437442
438443 got := map [string ]any {}
439444 deletes := map [string ]bool {}
440- message .HandleSubscriptionWithDebounce (
445+ message .HandleSubscription (
441446 logging .NewLogger (t .Output (), egv1a1 .DefaultEnvoyGatewayLogging ()),
442447 message.Metadata {Runner : "demo" , Message : "demo" },
443448 sub ,
@@ -448,7 +453,7 @@ func TestHandleSubscriptionDebounceCoalescesAcrossKeys(t *testing.T) {
448453 }
449454 got [update .Key ] = update .Value
450455 },
451- message.DebounceOptions {After : 150 * time .Millisecond , Max : 10 * time .Second },
456+ & message.DebounceOptions {After : 150 * time .Millisecond , Max : 10 * time .Second },
452457 )
453458
454459 // Last write wins per key, and the trailing delete for "baz" survives.
0 commit comments