aboutsummaryrefslogtreecommitdiffstats
path: root/extras/hs-test
diff options
context:
space:
mode:
authorAdrian Villin <avillin@cisco.com>2024-06-05 05:53:50 -0400
committerDave Wallace <dwallacelf@gmail.com>2024-06-05 16:57:00 +0000
commit7ad37b5cf5fbcc92ccaf781f4a5ee8fead7960bf (patch)
tree9456e8ee3e825d6df3a1c0f3b51a416951302cec /extras/hs-test
parent8a284cc6115164afca579a5177116d48ad110744 (diff)
hs-test: keep ab/wrk containers alive until teardown
- Fixes errors while obtaining container logs on test failure (NginxPerf tests), ab/wrk containers are now stopped on test teardown like other containers. Type: test Change-Id: Ic336fcd3ed6bf68dd345d378262cb28eb5efc789 Signed-off-by: Adrian Villin <avillin@cisco.com>
Diffstat (limited to 'extras/hs-test')
-rw-r--r--extras/hs-test/container.go2
-rw-r--r--extras/hs-test/http_test.go2
2 files changed, 3 insertions, 1 deletions
diff --git a/extras/hs-test/container.go b/extras/hs-test/container.go
index 44d84d5fe65..080eb736ad4 100644
--- a/extras/hs-test/container.go
+++ b/extras/hs-test/container.go
@@ -180,7 +180,7 @@ func (c *Container) prepareCommand() (string, error) {
cmd := "docker run "
if c.runDetached {
- cmd += " -d"
+ cmd += " -dt"
}
c.allocateCpus()
diff --git a/extras/hs-test/http_test.go b/extras/hs-test/http_test.go
index 4f7ed939d11..875d489b343 100644
--- a/extras/hs-test/http_test.go
+++ b/extras/hs-test/http_test.go
@@ -247,6 +247,7 @@ func runNginxPerf(s *NoTopoSuite, mode, ab_or_wrk string) error {
if ab_or_wrk == "ab" {
abCont := s.getContainerByName("ab")
+ abCont.runDetached = true
args := fmt.Sprintf("-n %d -c %d", nRequests, nClients)
if mode == "rps" {
args += " -k"
@@ -264,6 +265,7 @@ func runNginxPerf(s *NoTopoSuite, mode, ab_or_wrk string) error {
s.assertNil(err, "err: '%s', output: '%s'", err, o)
} else {
wrkCont := s.getContainerByName("wrk")
+ wrkCont.runDetached = true
args := fmt.Sprintf("-c %d -t 2 -d 30 http://%s:80/64B.json", nClients,
serverAddress)
wrkCont.extraRunningArgs = args