3 func (s *VethsSuite) TestEchoBuiltin() {
4 serverVpp := s.getContainerByName("server-vpp").vppInstance
5 serverVeth := s.netInterfaces["vppsrv"]
7 serverVpp.vppctl("test echo server " +
8 " uri tcp://" + serverVeth.ip4AddressString() + "/1234")
10 clientVpp := s.getContainerByName("client-vpp").vppInstance
12 o := clientVpp.vppctl("test echo client nclients 100 bytes 1 verbose" +
13 " syn-timeout 100 test-timeout 100" +
14 " uri tcp://" + serverVeth.ip4AddressString() + "/1234")
16 s.assertNotContains(o, "failed:")
19 func (s *VethsSuite) TestTcpWithLoss() {
20 serverVpp := s.getContainerByName("server-vpp").vppInstance
22 serverVeth := s.netInterfaces[serverInterfaceName]
23 serverVpp.vppctl("test echo server uri tcp://%s/20022",
24 serverVeth.ip4AddressString())
26 clientVpp := s.getContainerByName("client-vpp").vppInstance
28 // Ensure that VPP doesn't abort itself with NSIM enabled
29 // Warning: Removing this ping will make the test fail!
30 clientVpp.vppctl("ping %s", serverVeth.ip4AddressString())
32 // Add loss of packets with Network Delay Simulator
33 clientVpp.vppctl("set nsim poll-main-thread delay 0.01 ms bandwidth 40 gbit" +
34 " packet-size 1400 packets-per-drop 1000")
36 clientVpp.vppctl("nsim output-feature enable-disable host-vppcln")
38 // Do echo test from client-vpp container
39 output := clientVpp.vppctl("test echo client uri tcp://%s/20022 verbose echo-bytes mbytes 50",
40 serverVeth.ip4AddressString())
42 s.assertNotEqual(len(output), 0)
43 s.assertNotContains(output, "failed: timeout", output)