summaryrefslogtreecommitdiff
path: root/tests/api_send_eth0_3s1r/receiver.py
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-06-30 12:11:59 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2022-06-30 12:11:59 +0200
commitd0ae9f329685a19136cfd9a890b305db3bc384b9 (patch)
treeb3c72908b8930db16b1f682bb7119abeaf72fadf /tests/api_send_eth0_3s1r/receiver.py
parent1bef51d87860f782f687533012167bebb43c093d (diff)
Improve tests
Diffstat (limited to 'tests/api_send_eth0_3s1r/receiver.py')
-rw-r--r--tests/api_send_eth0_3s1r/receiver.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/api_send_eth0_3s1r/receiver.py b/tests/api_send_eth0_3s1r/receiver.py
new file mode 100644
index 0000000..4516d7a
--- /dev/null
+++ b/tests/api_send_eth0_3s1r/receiver.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+
+def receive(node, n):
+ for i in range(0,n):
+ code, data=node.receive("eth0")
+ msg="Received: "+data if code == 0 else "Receive failed code="+str(code)
+ node.log(msg)
+
+def execute(api):
+ # Receive the first 3 send that should end at 3s
+ receive(api,3)
+ # Receive the first 3 send that should end at 7s
+ receive(api,3)
+ # Receive the first 3 send that should end at 12s
+ receive(api,3)
+ # Receive the first 3 send that should end at 18s
+ receive(api,3)
+ # Should ends at 23s
+ receive(api,1)