Skip to content

Commit

Permalink
[pylibs] fix raw test_commissioning by giving more time for nodes to …
Browse files Browse the repository at this point in the history
…scan channels.
  • Loading branch information
EskoDijk committed Jun 9, 2024
1 parent 225473b commit ee6998f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pylibs/unittests/test_commissioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ def testRawNoSetup(self):

def testRawSetup(self):
ns = self.ns
ns.web()
n1 = ns.add("router")
n2 = ns.add("router")
n3 = ns.add("router")

# n1 with full dataset becomes Leader.
ns.node_cmd(n1, "dataset init new")
ns.node_cmd(n1, "dataset panid 0xface")
ns.node_cmd(n1, "dataset networkkey 00112233445566778899aabbccddeeff")
Expand All @@ -63,14 +63,15 @@ def testRawSetup(self):
ns.node_cmd(n1, "dataset commit active")
ns.ifconfig_up(n1)
ns.thread_start(n1)
ns.go(10)

# n2, n3 with partial dataset will scan channels to find n1.
# This can take some time.
for id in (n2, n3):
ns.config_dataset(id, panid=0xface, network_name="test", networkkey="00112233445566778899aabbccddeeff")
ns.ifconfig_up(id)
ns.thread_start(id)

self.go(60)
self.go(250)
self.assertFormPartitions(1)

def testCommissioning(self):
Expand Down

0 comments on commit ee6998f

Please sign in to comment.