summaryrefslogtreecommitdiff
path: root/tests/api_receivet_eth0_1s1r
diff options
context:
space:
mode:
Diffstat (limited to 'tests/api_receivet_eth0_1s1r')
-rw-r--r--tests/api_receivet_eth0_1s1r/out2
-rw-r--r--tests/api_receivet_eth0_1s1r/receiver.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/api_receivet_eth0_1s1r/out b/tests/api_receivet_eth0_1s1r/out
index 98756b5..3573164 100644
--- a/tests/api_receivet_eth0_1s1r/out
+++ b/tests/api_receivet_eth0_1s1r/out
@@ -2,7 +2,7 @@
[t=1.000,src=n1] Receive 1 bytes on eth0
[t=1.000,src=n1] Received: Hello World!
[t=1.000,src=n0] Send 1 bytes to n1 on eth0
-[t=1.500,src=n1] Receive failed code=-1
+[t=1.500,src=n1] Receive failed code=RCode.TIMEOUT_EXPIRE
[t=2.000,src=n1] Receive 1 bytes on eth0
[t=2.000,src=n1] Received: Hello World!
[t=2.000,src=esds] Simulation ends
diff --git a/tests/api_receivet_eth0_1s1r/receiver.py b/tests/api_receivet_eth0_1s1r/receiver.py
index 515ff6a..3869830 100644
--- a/tests/api_receivet_eth0_1s1r/receiver.py
+++ b/tests/api_receivet_eth0_1s1r/receiver.py
@@ -1,9 +1,10 @@
#!/usr/bin/env python
+from esds import RCode
def receivet(node,timeout):
##### Simple receive
code, data=node.receivet("eth0",timeout)
- msg="Received: "+data if code == 0 else "Receive failed code="+str(code)
+ msg="Received: "+data if code == RCode.SUCCESS else "Receive failed code="+str(code)
node.log(msg)
def execute(api):