[tests] update test_detach to be more robust (#12299)

The router processes its child table every second. After a child
gracefully detaches, wait some time to ensure that the router has
processed the child table entry.
This commit is contained in:
Jonathan Hui
2026-01-14 18:14:12 -08:00
committed by GitHub
parent 0d1cca30da
commit 8406751ecb
+1
View File
@@ -98,6 +98,7 @@ class TestDetach(thread_cert.TestCase):
child1.detach()
self.assertEqual(child1.get_state(), 'disabled')
self.simulator.go(2) # The router processes its child table every second; wait 2s to be safe.
self.assertFalse(router1.get_child_table())
router1.detach()