2 Documentation Test suite measuring connectivity speed.
3 Suite Setup Setup SXP Environment
4 Suite Teardown Clean SXP Environment
5 Test Teardown Test Clean
6 Library ../../../libraries/Sxp.py
7 Resource ../../../libraries/SxpLib.robot
8 Library Remote http://${ODL_SYSTEM_IP}:8270/ConnectionTestLibrary WITH NAME ConnectionTestLibrary
15 [Documentation] Test covering speed of connecting to remote peers without TCP-MD5
16 Check Connectivity 80 70 30
18 Connectivity TCP-MD5 Test
19 [Documentation] Test covering speed of connecting to remote peers with TCP-MD5
20 Check Connectivity 80 70 10 passwd
24 [Arguments] ${connections} ${PASSWORD} ${version}
25 [Documentation] Adds connections to local and remote nodes
26 FOR ${num} IN RANGE 0 ${connections}
27 ${address} Get Ip From Number ${num} 2130771968
28 Add Connection ${version} listener ${address} 64999 password=${PASSWORD}
29 ConnectionTestLibrary.Add Node ${address} ${version} 64999 ${PASSWORD}
30 ConnectionTestLibrary.Add Connection ${version} speaker 127.0.0.1 64999 ${PASSWORD}
35 [Arguments] ${peers} ${min_peers} ${min_speed} ${PASSWORD}=${EMPTY} ${version}=version4
36 [Documentation] Starts SXP nodes and checks if peers are already connected, this is repeated N times
38 FOR ${num} IN RANGE 0 ${TEST_SAMPLES}
39 Setup Topology ${peers} ${PASSWORD} ${version}
40 ConnectionTestLibrary.Start Nodes
41 ConnectionTestLibrary.Initiate Connecting ${min_peers}
42 ${ELEMENT} Wait Until Keyword Succeeds 120 1 Check Connections Connected
43 Append To List ${ITEMS} ${ELEMENT}
46 ${connectivity_speed} Get Average Of Items ${ITEMS}
47 Log Average connectivity speed ${connectivity_speed} connection/s.
48 Should Be True ${connectivity_speed} > ${min_speed}
50 Check Connections Connected
51 [Documentation] Checking if Peers were connected and return connectivity speed
52 ${peers_connected} ConnectionTestLibrary.Get Connected Peers
53 ${connect_time} ConnectionTestLibrary.Get Connect Time
54 Should Not Be Equal As Numbers ${connect_time} 0
55 ${connectivity_speed} Evaluate ${peers_connected}/${connect_time}
56 [Return] ${connectivity_speed}
59 ConnectionTestLibrary.Clean Library