Skip to content

Commit

Permalink
Philippe's review
Browse files Browse the repository at this point in the history
Signed-off-by: Parthvi Vala <[email protected]>
  • Loading branch information
valaparthvi committed Jun 17, 2022
1 parent fa23102 commit d21547f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 1 addition & 2 deletions pkg/devfile/adapters/kubernetes/component/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package component
import (
"fmt"
"io"
"time"

"k8s.io/utils/pointer"

Expand Down Expand Up @@ -53,7 +52,7 @@ func (a *Adapter) getPod(refresh bool) (*corev1.Pod, error) {
podSelector := fmt.Sprintf("component=%s", a.ComponentName)

// Wait for Pod to be in running state otherwise we can't sync data to it.
pod, err := a.kubeClient.WaitAndGetPodWithEvents(podSelector, corev1.PodRunning, time.Duration(a.prefClient.GetPushTimeout())*time.Second)
pod, err := a.kubeClient.WaitAndGetPodWithEvents(podSelector, corev1.PodRunning, a.prefClient.GetPushTimeout())
if err != nil {
return nil, fmt.Errorf("error while waiting for pod %s: %w", podSelector, err)
}
Expand Down
7 changes: 4 additions & 3 deletions pkg/odo/cli/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ import (
"github.com/redhat-developer/odo/pkg/preference"
odoversion "github.com/redhat-developer/odo/pkg/version"

"github.com/redhat-developer/odo/pkg/odo/util"
"github.com/spf13/cobra"
"k8s.io/klog"
ktemplates "k8s.io/kubectl/pkg/util/templates"

"github.com/redhat-developer/odo/pkg/odo/util"
)

// RecommendedCommandName is the recommended version command name
Expand Down Expand Up @@ -63,11 +64,11 @@ func (o *VersionOptions) Complete(cmdline cmdline.Cmdline, args []string) (err e
// checking the value of timeout in preference
var timeout time.Duration
if o.clientset.PreferenceClient != nil {
timeout = time.Duration(o.clientset.PreferenceClient.GetTimeout()) * time.Second
timeout = o.clientset.PreferenceClient.GetTimeout()
} else {
// the default timeout will be used
// when the value is not readable from preference
timeout = preference.DefaultTimeout * time.Second
timeout = preference.DefaultTimeout
}
o.serverInfo, _ = client.GetServerVersion(timeout)
}
Expand Down
2 changes: 1 addition & 1 deletion tests/helper/helper_filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func DeleteDir(dir string) {
fmt.Fprintf(GinkgoWriter, "Unable to delete %s on attempt #%d, trying again...\n", dir, attempts)

return err
}, 16, time.Duration(2)*time.Minute)
}, 16, 2*time.Minute)
Expect(err).NotTo(HaveOccurred())

if errorReportedAtLeastOnce {
Expand Down

0 comments on commit d21547f

Please sign in to comment.