diff --git a/test/e2e/network/networking_perf.go b/test/e2e/network/networking_perf.go index c826bafcab6..e8a7b608ecb 100644 --- a/test/e2e/network/networking_perf.go +++ b/test/e2e/network/networking_perf.go @@ -36,9 +36,8 @@ const ( smallClusterTimeout = 200 * time.Second ) -// Declared as Flakey since it has not been proven to run in parallel on small nodes or slow networks in CI -// TODO jayunit100 : Retag this test according to semantics from #22401 -var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking-Performance]", func() { +// networkingIPerf test runs iperf on a container in either IPv4 or IPv6 mode. +func networkingIPerfTest(isIPv6 bool) { f := framework.NewDefaultFramework("network-perf") @@ -49,6 +48,11 @@ var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking- numServer := 1 maxBandwidthBits := gceBandwidthBitsEstimate + familyStr := "" + if isIPv6 { + familyStr = "-V " + } + It(fmt.Sprintf("should transfer ~ 1GB onto the service endpoint %v servers (maximum of %v clients)", numServer, numClient), func() { nodes := framework.GetReadySchedulableNodesOrDie(f.ClientSet) totalPods := len(nodes.Items) @@ -68,7 +72,7 @@ var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking- Args: []string{ "/bin/sh", "-c", - "/usr/local/bin/iperf -s -p 8001 ", + "/usr/local/bin/iperf " + familyStr + "-s -p 8001 ", }, Ports: []v1.ContainerPort{{ContainerPort: 8001}}, }}, @@ -96,7 +100,7 @@ var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking- Args: []string{ "/bin/sh", "-c", - "/usr/local/bin/iperf -c service-for-" + appName + " -p 8002 --reportstyle C && sleep 5", + "/usr/local/bin/iperf " + familyStr + "-c service-for-" + appName + " -p 8002 --reportstyle C && sleep 5", }, }, }, @@ -153,4 +157,16 @@ var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking- framework.Logf("%v had bandwidth %v. Ratio to expected (%v) was %f", ipClient, bandwidth, expectedBandwidth, float64(bandwidth)/float64(expectedBandwidth)) } }) +} + +// Declared as Flakey since it has not been proven to run in parallel on small nodes or slow networks in CI +// TODO jayunit100 : Retag this test according to semantics from #22401 +var _ = SIGDescribe("Networking IPerf IPv4 [Experimental] [Feature:Networking-IPv4] [Slow] [Feature:Networking-Performance]", func() { + networkingIPerfTest(false) +}) + +// Declared as Flakey since it has not been proven to run in parallel on small nodes or slow networks in CI +// TODO jayunit100 : Retag this test according to semantics from #22401 +var _ = SIGDescribe("Networking IPerf IPv6 [Experimental] [Feature:Networking-IPv6] [Slow] [Feature:Networking-Performance]", func() { + networkingIPerfTest(true) })