Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions npm/nameSpaceController_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ func (f *nameSpaceFixture) newNsController(stopCh chan struct{}) {
for _, ns := range f.nsLister {
f.kubeInformer.Core().V1().Namespaces().Informer().GetIndexer().Add(ns)
}

f.kubeInformer.Start(stopCh)
// Do not start informer to avoid unnecessary event triggers.
// (TODO) Leave stopCh and below commented code to enhance UTs to even check event triggers as well later if possible
//f.kubeInformer.Start()
}

func (f *nameSpaceFixture) ipSetSave(ipsetConfigFile string) {
Expand Down
4 changes: 3 additions & 1 deletion npm/networkPolicyController_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ func (f *netPolFixture) newNetPolController(stopCh chan struct{}) {
f.kubeInformer.Networking().V1().NetworkPolicies().Informer().GetIndexer().Add(netPol)
}

f.kubeInformer.Start(stopCh)
// Do not start informer to avoid unnecessary event triggers
// (TODO): Leave stopCh and below commented code to enhance UTs to even check event triggers as well later if possible
//f.kubeInformer.Start(stopCh)
}

func (f *netPolFixture) saveIpTables(iptablesConfigFile string) {
Expand Down
4 changes: 3 additions & 1 deletion npm/podController_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ func (f *podFixture) newPodController(stopCh chan struct{}) {
f.kubeInformer.Core().V1().Pods().Informer().GetIndexer().Add(pod)
}

f.kubeInformer.Start(stopCh)
// Do not start informer to avoid unnecessary event triggers
// (TODO): Leave stopCh and below commented code to enhance UTs to even check event triggers as well later if possible
//f.kubeInformer.Start(stopCh)
}

func (f *podFixture) ipSetSave(ipsetConfigFile string) {
Expand Down