[test] restart SRP server (instead of reset) to validate port change (#6763)

This commit updates `test_srp_server_reboot_port` to restart the SRP
sever instead of performing a full device reset. The SRP restart will
trigger the port number change by the server which is the behavior
this test is intended to verify. This change should help address
intermittent failures on this test.
This commit is contained in:
Abtin Keshavarzian
2021-06-24 10:28:08 -07:00
committed by Jonathan Hui
parent 11ac430155
commit b11d0d2205
@@ -35,7 +35,7 @@ import command
import thread_cert
# Test description:
# This test verifies when an SRP server reboots, it will listen to a UDP port
# This test verifies when an SRP server restarts, it will listen to a UDP port
# that wasn't used in the last time.
#
# Topology:
@@ -49,7 +49,7 @@ SERVER = 2
REBOOT_TIMES = 25
class SrpAutoStartMode(thread_cert.TestCase):
class SrpServerRebootPort(thread_cert.TestCase):
USE_MESSAGE_FACTORY = False
SUPPORT_NCP = False
@@ -99,8 +99,6 @@ class SrpAutoStartMode(thread_cert.TestCase):
#
old_port = server.get_srp_server_port()
server.srp_server_set_enabled(False)
server.reset()
server.start()
self.simulator.go(5)
server.srp_server_set_enabled(True)
self.simulator.go(5)
@@ -124,8 +122,6 @@ class SrpAutoStartMode(thread_cert.TestCase):
#
old_port = server.get_srp_server_port()
server.srp_server_set_enabled(False)
server.reset()
server.start()
self.simulator.go(5)
#