diff options
Diffstat (limited to 'extras/hs-test/proxy_test.go')
-rw-r--r-- | extras/hs-test/proxy_test.go | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/extras/hs-test/proxy_test.go b/extras/hs-test/proxy_test.go index 758064424a8..b914242d34f 100644 --- a/extras/hs-test/proxy_test.go +++ b/extras/hs-test/proxy_test.go @@ -10,6 +10,7 @@ func init() { RegisterVppProxyTests(VppProxyHttpGetTcpTest, VppProxyHttpGetTlsTest, VppProxyHttpPutTcpTest, VppProxyHttpPutTlsTest) RegisterEnvoyProxyTests(EnvoyProxyHttpGetTcpTest, EnvoyProxyHttpPutTcpTest) RegisterNginxProxyTests(NginxMirroringTest) + RegisterNginxProxySoloTests(MirrorMultiThreadTest) } func configureVppProxy(s *VppProxySuite, proto string, proxyPort uint16) { @@ -63,9 +64,22 @@ func EnvoyProxyHttpPutTcpTest(s *EnvoyProxySuite) { s.CurlUploadResource(uri, CurlContainerTestFile) } -// broken when CPUS > 1 +func MirrorMultiThreadTest(s *NginxProxySuite) { + nginxMirroring(s, true) +} + func NginxMirroringTest(s *NginxProxySuite) { - s.SkipIfMultiWorker() + nginxMirroring(s, false) +} + +func nginxMirroring(s *NginxProxySuite, multiThreadWorkers bool) { + nginxProxyContainer := s.GetContainerByName(NginxProxyContainerName) + vpp := s.GetContainerByName(VppContainerName).VppInstance + + s.AddVclConfig(nginxProxyContainer, multiThreadWorkers) + s.CreateNginxProxyConfig(nginxProxyContainer, multiThreadWorkers) + nginxProxyContainer.Start() + vpp.WaitForApp("nginx-", 5) uri := fmt.Sprintf("http://%s:%d/httpTestFile", s.ProxyAddr(), s.ProxyPort()) s.CurlDownloadResource(uri) } |