diff --git a/executor/predictor/predictor_process.go b/executor/predictor/predictor_process.go index 0b95e68e97..6b6cc2868d 100644 --- a/executor/predictor/predictor_process.go +++ b/executor/predictor/predictor_process.go @@ -443,7 +443,7 @@ func (p *PredictorProcess) Status(node *v1.PredictiveUnit, modelName string, msg if nodeModel := v1.GetPredictiveUnit(node, modelName); nodeModel == nil { return nil, fmt.Errorf("Failed to find model %s", modelName) } else { - return p.Client.Status(p.Ctx, modelName, nodeModel.Endpoint.ServiceHost, p.getPort(node), msg, p.Meta.Meta) + return p.Client.Status(p.Ctx, modelName, nodeModel.Endpoint.ServiceHost, p.getPort(nodeModel), msg, p.Meta.Meta) } } @@ -451,7 +451,7 @@ func (p *PredictorProcess) Metadata(node *v1.PredictiveUnit, modelName string, m if nodeModel := v1.GetPredictiveUnit(node, modelName); nodeModel == nil { return nil, fmt.Errorf("Failed to find model %s", modelName) } else { - return p.Client.Metadata(p.Ctx, modelName, nodeModel.Endpoint.ServiceHost, p.getPort(node), msg, p.Meta.Meta) + return p.Client.Metadata(p.Ctx, modelName, nodeModel.Endpoint.ServiceHost, p.getPort(nodeModel), msg, p.Meta.Meta) } } diff --git a/operator/controllers/suite_test.go b/operator/controllers/suite_test.go index c71321789c..45444cd86f 100644 --- a/operator/controllers/suite_test.go +++ b/operator/controllers/suite_test.go @@ -22,6 +22,7 @@ import ( "os" "path/filepath" "testing" + "time" kedav1alpha1 "github.com/kedacore/keda/v2/apis/keda/v1alpha1" . "github.com/onsi/ginkgo" @@ -174,6 +175,7 @@ var _ = BeforeSuite(func(done Done) { cfg, err = testEnv.Start() Expect(err).ToNot(HaveOccurred()) Expect(cfg).ToNot(BeNil()) + cfg.Timeout = time.Second * 10 clientset, err = kubernetes.NewForConfig(cfg) Expect(err).NotTo(HaveOccurred()) @@ -219,7 +221,7 @@ var _ = BeforeSuite(func(done Done) { Log: ctrl.Log.WithName("controllers").WithName("SeldonDeployment"), Scheme: k8sManager.GetScheme(), Recorder: k8sManager.GetEventRecorderFor(constants.ControllerName), - }).SetupWithManager(context.TODO(), k8sManager, constants.ControllerName) + }).SetupWithManager(context.Background(), k8sManager, constants.ControllerName) Expect(err).ToNot(HaveOccurred()) //k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme})