aboutsummaryrefslogtreecommitdiffstats
path: root/extras/hs-test/infra/hst_suite.go
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2024-06-27 13:20:10 +0200
committerFlorin Coras <florin.coras@gmail.com>2024-07-23 20:37:16 +0000
commitd086a3650eea95056e738e2cc5dc18ce6edc278b (patch)
tree4dcb6d843b01143ab76428c268b6e382c6694545 /extras/hs-test/infra/hst_suite.go
parent8ca6ce6fe1e65c8b57b9c0910dfd1243db0e49b9 (diff)
http: state machine fix
When client sends second request without waiting for response of the first request http_ts_rx_callback should drop request (pipelining is not supported) instead of invoking return to state machine which can lead to erroneous state, e.g. reading random data from server app fifo. Added simple http static server url handler for testing to simulate long running request processing, for now hardcoded delay 5 seconds. Type: fix Change-Id: Ied9f7e2e4ee64c982f045c0f7f99a2dc5d7a2108 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'extras/hs-test/infra/hst_suite.go')
-rw-r--r--extras/hs-test/infra/hst_suite.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/extras/hs-test/infra/hst_suite.go b/extras/hs-test/infra/hst_suite.go
index 2cf241afa64..1f1d54b1b94 100644
--- a/extras/hs-test/infra/hst_suite.go
+++ b/extras/hs-test/infra/hst_suite.go
@@ -224,6 +224,10 @@ func (s *HstSuite) AssertNotEmpty(object interface{}, msgAndArgs ...interface{})
Expect(object).ToNot(BeEmpty(), msgAndArgs...)
}
+func (s *HstSuite) AssertMatchError(actual, expected error, msgAndArgs ...interface{}) {
+ Expect(actual).To(MatchError(expected))
+}
+
func (s *HstSuite) CreateLogger() {
suiteName := s.GetCurrentSuiteName()
var err error