X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftest_neighbor.py;h=7157839127b0ff544e60312e0fe893bd23668f4d;hb=1284f8c71da8ec35cba04351cf62cba7bdd7f847;hp=d1fb8f835821e750e7dfdbcb369bea7d706b9f57;hpb=f145c15631ba62e798395499f83a2f8a91ae83c7;p=vpp.git diff --git a/test/test_neighbor.py b/test/test_neighbor.py index d1fb8f83582..7157839127b 100644 --- a/test/test_neighbor.py +++ b/test/test_neighbor.py @@ -1731,7 +1731,7 @@ class NeighborAgeTestCase(VppTestCase): # # Set the neighbor configuration: # limi = 200 - # age = 2 seconds + # age = 0 seconds # recycle = false # self.vapi.ip_neighbor_config(af=vaf.ADDRESS_IP4, @@ -1808,6 +1808,27 @@ class NeighborAgeTestCase(VppTestCase): self.assertFalse(self.vapi.ip_neighbor_dump(sw_if_index=0xffffffff, af=vaf.ADDRESS_IP4)) + # + # load up some neighbours again with 2s aging enabled + # they should be removed after 10s (2s age + 4s for probes + gap) + # + for ii in range(10): + VppNeighbor(self, + self.pg0.sw_if_index, + self.pg0.remote_hosts[ii].mac, + self.pg0.remote_hosts[ii].ip4).add_vpp_config() + self.sleep(10) + self.assertFalse(self.vapi.ip_neighbor_dump(sw_if_index=0xffffffff, + af=vaf.ADDRESS_IP4)) + + # + # check if we can set age and recycle with empty neighbor list + # + self.vapi.ip_neighbor_config(af=vaf.ADDRESS_IP4, + max_number=200, + max_age=1000, + recycle=True) + # # load up some neighbours again, then disable the aging # they should still be there in 10 seconds time