diff options
Diffstat (limited to 'extras/hs-test/proxy_test.go')
-rw-r--r-- | extras/hs-test/proxy_test.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/extras/hs-test/proxy_test.go b/extras/hs-test/proxy_test.go index 3afdc3103a3..d371de46cbb 100644 --- a/extras/hs-test/proxy_test.go +++ b/extras/hs-test/proxy_test.go @@ -25,6 +25,7 @@ func init() { RegisterVppProxySoloTests(VppProxyHttpGetTcpMTTest, VppProxyHttpPutTcpMTTest, VppProxyTcpIperfMTTest, VppProxyUdpIperfMTTest, VppConnectProxyStressTest, VppConnectProxyStressMTTest) RegisterVppUdpProxyTests(VppProxyUdpTest) + RegisterVppUdpProxySoloTests(VppProxyUdpMigrationMTTest) RegisterEnvoyProxyTests(EnvoyProxyHttpGetTcpTest, EnvoyProxyHttpPutTcpTest) RegisterNginxProxyTests(NginxMirroringTest) RegisterNginxProxySoloTests(MirrorMultiThreadTest) @@ -350,3 +351,25 @@ func VppProxyUdpTest(s *VppUdpProxySuite) { s.AssertNil(err, fmt.Sprint(err)) s.AssertEqual([]byte("hello"), b[:n]) } + +func VppProxyUdpMigrationMTTest(s *VppUdpProxySuite) { + remoteServerConn := s.StartEchoServer() + defer remoteServerConn.Close() + + vppProxy := s.Containers.VppProxy.VppInstance + cmd := fmt.Sprintf("test proxy server fifo-size 512k server-uri udp://%s/%d", s.VppProxyAddr(), s.ProxyPort()) + cmd += fmt.Sprintf(" client-uri udp://%s/%d", s.ServerAddr(), s.ServerPort()) + s.Log(vppProxy.Vppctl(cmd)) + + b := make([]byte, 1500) + + n, err := s.ClientSendReceive([]byte("hello"), b) + s.AssertNil(err, fmt.Sprint(err)) + s.AssertEqual([]byte("hello"), b[:n]) + + n, err = s.ClientSendReceive([]byte("world"), b) + s.AssertNil(err, fmt.Sprint(err)) + s.AssertEqual([]byte("world"), b[:n]) + + s.Log(s.Containers.VppProxy.VppInstance.Vppctl("show session verbose 2")) +} |