@@ -638,7 +638,7 @@ func TestEventHandler_ProviderReadiness(t *testing.T) {
638
638
defer t .Cleanup (initSingleton )
639
639
640
640
eventingImpl := & ProviderEventing {
641
- c : make (chan Event , 1 ),
641
+ c : make (chan Event ),
642
642
}
643
643
644
644
readyEventingProvider := struct {
@@ -673,7 +673,7 @@ func TestEventHandler_ProviderReadiness(t *testing.T) {
673
673
defer t .Cleanup (initSingleton )
674
674
675
675
eventingImpl := & ProviderEventing {
676
- c : make (chan Event , 1 ),
676
+ c : make (chan Event ),
677
677
}
678
678
679
679
readyEventingProvider := struct {
@@ -685,7 +685,7 @@ func TestEventHandler_ProviderReadiness(t *testing.T) {
685
685
}
686
686
687
687
clientAssociation := "clientA"
688
- err := SetNamedProvider (clientAssociation , readyEventingProvider )
688
+ err := SetNamedProviderAndWait (clientAssociation , readyEventingProvider )
689
689
if err != nil {
690
690
t .Fatal (err )
691
691
}
@@ -695,7 +695,7 @@ func TestEventHandler_ProviderReadiness(t *testing.T) {
695
695
rsp <- e
696
696
}
697
697
698
- client := NewClient (clientAssociation )
698
+ client := api . GetNamedClient (clientAssociation )
699
699
client .AddHandler (ProviderReady , & callback )
700
700
701
701
select {
@@ -710,9 +710,8 @@ func TestEventHandler_ProviderReadiness(t *testing.T) {
710
710
defer t .Cleanup (initSingleton )
711
711
712
712
eventingImpl := & ProviderEventing {
713
- c : make (chan Event , 1 ),
713
+ c : make (chan Event ),
714
714
}
715
- eventingImpl .Invoke (Event {EventType : ProviderConfigChange })
716
715
717
716
readyEventingProvider := struct {
718
717
FeatureProvider
@@ -722,7 +721,7 @@ func TestEventHandler_ProviderReadiness(t *testing.T) {
722
721
eventingImpl ,
723
722
}
724
723
725
- err := SetProvider (readyEventingProvider )
724
+ err := SetProviderAndWait (readyEventingProvider )
726
725
if err != nil {
727
726
t .Fatal (err )
728
727
}
@@ -732,7 +731,7 @@ func TestEventHandler_ProviderReadiness(t *testing.T) {
732
731
rsp <- e
733
732
}
734
733
735
- client := NewClient ("someClient" )
734
+ client := api . GetNamedClient ("someClient" )
736
735
client .AddHandler (ProviderReady , & callback )
737
736
738
737
select {
@@ -770,7 +769,7 @@ func TestEventHandler_ProviderReadiness(t *testing.T) {
770
769
rsp <- e
771
770
}
772
771
773
- client := NewClient ("someClient" )
772
+ client := api . GetNamedClient ("someClient" )
774
773
client .AddHandler (ProviderReady , & callback )
775
774
776
775
select {
@@ -1357,7 +1356,6 @@ func TestEventHandler_1ToNMapping(t *testing.T) {
1357
1356
}
1358
1357
1359
1358
// Contract tests - registration & removal
1360
-
1361
1359
func TestEventHandler_Registration (t * testing.T ) {
1362
1360
t .Run ("API handlers" , func (t * testing.T ) {
1363
1361
executor := newEventExecutor ()
0 commit comments