@@ -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 }
0 commit comments