Skip to content

Commit 9891ac4

Browse files
authored
Merge pull request kubernetes#95333 from jayunit100/node_port_udp_fast_test
Node port udp fast test
2 parents 5c5d267 + e7a9a94 commit 9891ac4

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

test/e2e/framework/network/utils.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,9 @@ func (config *NetworkingTestConfig) setupCore(selector map[string]string) {
686686
config.createTestPods()
687687

688688
epCount := len(config.EndpointPods)
689+
690+
// Note that this is not O(n^2) in practice, because epCount SHOULD be < 10. In cases that epCount is > 10, this would be prohibitively large.
691+
// Check maxNetProxyPodsCount for details.
689692
config.MaxTries = epCount*epCount + testTries
690693
framework.Logf("Setting MaxTries for pod polling to %v for networking test based on endpoint count %v", config.MaxTries, epCount)
691694
}

test/e2e/network/networking.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,16 @@ var _ = SIGDescribe("Networking", func() {
363363
}
364364
})
365365

366+
// quick validation of udp, next test confirms that this services update as well after endpoints are removed, but is slower.
367+
ginkgo.It("should support basic nodePort: udp functionality", func() {
368+
config := e2enetwork.NewNetworkingTestConfig(f, true, false)
369+
ginkgo.By(fmt.Sprintf("dialing(udp) %v (node) --> %v:%v (nodeIP) and getting ALL host endpoints", config.NodeIP, config.NodeIP, config.NodeUDPPort))
370+
err := config.DialFromNode("udp", config.NodeIP, config.NodeUDPPort, config.MaxTries, 0, config.EndpointHostnames())
371+
if err != nil {
372+
framework.Failf("Failure validating that nodePort service WAS forwarding properly: %v", err)
373+
}
374+
})
375+
366376
// Slow because we confirm that the nodePort doesn't serve traffic, which requires a period of polling.
367377
ginkgo.It("should update nodePort: udp [Slow]", func() {
368378
config := e2enetwork.NewNetworkingTestConfig(f, true, false)

0 commit comments

Comments
 (0)