mirror of
https://gitlab.com/manzerbredes/esds.git
synced 2025-07-01 17:27:38 +00:00
Improve tests
This commit is contained in:
parent
1bef51d878
commit
d0ae9f3296
85 changed files with 77 additions and 44 deletions
15
tests/api_receivet_eth0_1s1r/receiver.py
Normal file
15
tests/api_receivet_eth0_1s1r/receiver.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
def receivet(node,timeout):
|
||||
##### Simple receive
|
||||
code, data=node.receivet("eth0",timeout)
|
||||
msg="Received: "+data if code == 0 else "Receive failed code="+str(code)
|
||||
node.log(msg)
|
||||
|
||||
def execute(api):
|
||||
# Should works
|
||||
receivet(api,2)
|
||||
# Should failed
|
||||
receivet(api,0.5) # At t=1.5s
|
||||
# Should works (priorities says that communications should occurs before timeout)
|
||||
receivet(api,0.5) # At t=2s (timeout+receive should occur)
|
Loading…
Add table
Add a link
Reference in a new issue