thread1.start()
# 2. start the dut test and wait till client gets IP address
dut1.start_app()
- data = dut1.expect(re.compile(r" sta ip: ([^,]+),"))
+ data = dut1.expect(re.compile(r" sta ip: ([^,]+),"), timeout=30)
# 3. send host's IP to the client i.e. the `dut1`
dut1.write(host_ip)
# 4. client `dut1` should receive a message
# 1. start test
dut1.start_app()
# 2. get the server IP address
- data = dut1.expect(re.compile(r" sta ip: ([^,]+),"))
+ data = dut1.expect(re.compile(r" sta ip: ([^,]+),"), timeout=30)
# 3. create tcp client and connect to server
cli = socket(AF_INET,SOCK_STREAM)
cli.connect((data[0],80))
# 1. start test
dut1.start_app()
# 2. get the server IP address
- data = dut1.expect(re.compile(r" sta ip: ([^,]+),"))
+ data = dut1.expect(re.compile(r" sta ip: ([^,]+),"), timeout=30)
# 3. create tcp client and connect to server
cli = socket(AF_INET,SOCK_STREAM)
cli.connect((data[0],80))
# 1. start test
dut1.start_app()
# 2. get the server IP address
- data = dut1.expect(re.compile(r" sta ip: ([^,]+),"))
+ data = dut1.expect(re.compile(r" sta ip: ([^,]+),"), timeout=30)
# 3. create tcp client and connect to server
cli = socket(AF_INET, SOCK_DGRAM)
cli.connect((data[0], 80))