Skip to content

Commit e23c345

Browse files
committed
rfac: change conn to http from tcp in long_conn e2e test and added delay btw requests
Signed-off-by: Yash Patel <[email protected]>
1 parent 7a2cf8d commit e23c345

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

test/e2e/baseline_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -827,20 +827,22 @@ func TestLongConnL4Telemetry(t *testing.T) {
827827
localDst := dst
828828
localSrc := src
829829
opt := echo.CallOptions{
830-
Port: echo.Port{Name: "tcp"},
830+
Port: echo.Port{Name: "http"},
831831
Scheme: scheme.TCP,
832-
Count: 10,
832+
Count: 20,
833833
Timeout: time.Second,
834834
Check: check.OK(),
835+
HTTP: echo.HTTP{Path: "/?delay=3s"},
835836
To: localDst,
836837
NewConnectionPerRequest: false,
837838
}
838839

840+
go localSrc.CallOrFail(stc, opt)
841+
839842
query := buildL4Query(localSrc, localDst, "kmesh_tcp_sent_bytes_total")
840843
stc.Logf("prometheus query: %#v", query)
841844
err := retry.Until(func() bool {
842845
stc.Logf("sending call from %q to %q", deployName(localSrc), localDst.Config().Service)
843-
localSrc.CallOrFail(stc, opt)
844846
reqs, err := prom.QuerySum(localSrc.Config().Cluster, query)
845847
if err != nil {
846848
stc.Logf("could not query for traffic from %q to %q: %v", deployName(localSrc), localDst.Config().Service, err)
@@ -856,6 +858,7 @@ func TestLongConnL4Telemetry(t *testing.T) {
856858
PromDiff(t, prom, localSrc.Config().Cluster, query)
857859
stc.Errorf("could not validate L4 telemetry for %q to %q: %v", deployName(localSrc), localDst.Config().Service, err)
858860
}
861+
time.Sleep(60 * time.Second)
859862
})
860863
}
861864
}

test/e2e/run_test.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,5 +298,4 @@ if [[ -n "${CLEANUP_REGISTRY}" ]]; then
298298
cleanup_docker_registry
299299
fi
300300

301-
rm -rf "${TMP}"
302-
301+
rm -rf "${TMP}"

0 commit comments

Comments
 (0)