diff options
author | 2024-12-30 20:40:51 +0100 | |
---|---|---|
committer | 2024-12-30 20:42:37 +0100 | |
commit | e210d413d53081f8603af16f203fb92e08127cdc (patch) | |
tree | b60aac85839a9339011e815b7192b204127caa73 /extras/hs-test/proxy_test.go | |
parent | d11d31653d948c9f3ac80afd69f111657b007f0f (diff) |
session: proxy session migration fix
Type: fix
Change-Id: I487ee4e69d8885f46d7a4af2c66a710da66108c5
Signed-off-by: Matus Fabian <matfabia@cisco.com>
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")) +} |