mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 16:06:51 +00:00
Merge pull request #24284 from marun/e2e-conn-check-timeout
Automatic merge from submit-queue Add timeout to e2e network connectivity checks Some e2e tests use wget to check connectivity, and the default e2e timeout is 900s. This change allows the timeout to be specified on a check-by-check basis. This will also make the check useful for negative checks (like those used by openshift to validate isolation) since a short timeout is suggested where connectivity is not expected.
This commit is contained in:
@@ -3682,7 +3682,7 @@ func LaunchWebserverPod(f *Framework, podName, nodeName string) (ip string) {
|
||||
// CheckConnectivityToHost launches a pod running wget on the
|
||||
// specified node to test connectivity to the specified host. An
|
||||
// error will be returned if the host is not reachable from the pod.
|
||||
func CheckConnectivityToHost(f *Framework, nodeName, podName, host string) error {
|
||||
func CheckConnectivityToHost(f *Framework, nodeName, podName, host string, timeout int) error {
|
||||
contName := fmt.Sprintf("%s-container", podName)
|
||||
pod := &api.Pod{
|
||||
TypeMeta: unversioned.TypeMeta{
|
||||
@@ -3696,7 +3696,7 @@ func CheckConnectivityToHost(f *Framework, nodeName, podName, host string) error
|
||||
{
|
||||
Name: contName,
|
||||
Image: "gcr.io/google_containers/busybox:1.24",
|
||||
Command: []string{"wget", "-s", host},
|
||||
Command: []string{"wget", fmt.Sprintf("--timeout=%d", timeout), "-s", host},
|
||||
},
|
||||
},
|
||||
NodeName: nodeName,
|
||||
|
||||
Reference in New Issue
Block a user