X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=integration%2Ftest.git;a=blobdiff_plain;f=csit%2Fsuites%2Fopenflowplugin%2FLongevity%2F010__longevity_test.robot;h=ea23c6b78eb04b9821003831d91da5abb2222da0;hp=4955b353c2b8c49ba116d4f5ba5b4f856c709bd7;hb=14c1be480643f37f1eeef9d16149b631edd6aa2d;hpb=540125131c520642019271cd3ce8a8e694df4af2 diff --git a/csit/suites/openflowplugin/Longevity/010__longevity_test.robot b/csit/suites/openflowplugin/Longevity/010__longevity_test.robot index 4955b353c2..ea23c6b78e 100644 --- a/csit/suites/openflowplugin/Longevity/010__longevity_test.robot +++ b/csit/suites/openflowplugin/Longevity/010__longevity_test.robot @@ -1,20 +1,24 @@ *** Settings *** -Documentation Beta Version of the Longevity Test. Currently it does a single test: -... 1. runs one iteration of the link scale test based on ${NUM_SWITCHES} -... Step 1 runs in a psuedo infinite loop and before each loop is -... run, a time check is made against the ${TEST_LENGTH}. If the test duration -... has expired, the loop is exited and the test is marked PASS -Suite Setup Workflow Setup -Suite Teardown Workflow Teardown -Library DateTime -Resource ../../../variables/Variables.robot -Resource ../../../libraries/WorkflowsOpenFlow.robot -Resource ../../../libraries/KarafKeywords.robot +Documentation Beta Version of the Longevity Test. Currently it does a single test: +... 1. runs one iteration of the link scale test based on ${NUM_SWITCHES} +... Step 1 runs in a psuedo infinite loop and before each loop is +... run, a time check is made against the ${TEST_LENGTH}. If the test duration +... has expired, the loop is exited and the test is marked PASS + +Library DateTime +Resource ../../../variables/Variables.robot +Resource ../../../libraries/WorkflowsOpenFlow.robot +Resource ../../../libraries/KarafKeywords.robot + +Suite Setup Workflow Setup +Suite Teardown Workflow Teardown + *** Variables *** -${NUM_SWITCHES} 36 -${SUSTAIN_TIME} 60s -${TEST_LENGTH} 2h +${NUM_SWITCHES} 36 +${SUSTAIN_TIME} 60s +${TEST_LENGTH} 2h + *** Test Cases *** Longevity Test @@ -25,14 +29,16 @@ Longevity Test ${start_time}= DateTime.Get Current Date # This loop is not infinite, so going "sufficiently large" for now. FOR ${i} IN RANGE 1 65536 - ${status} ${error_message} ${topology_discover_time} WorkflowsOpenFlow.Workflow Full Mesh Topology ${switches} ${SUSTAIN_TIME} + ${status} ${error_message} ${topology_discover_time}= WorkflowsOpenFlow.Workflow Full Mesh Topology + ... ${switches} + ... ${SUSTAIN_TIME} ${current_time}= DateTime.Get Current Date ${duration}= DateTime.Subtract Date From Date ${current_time} ${start_time} number - Exit For Loop If '${status}' == 'FAIL' - Exit For Loop If ${duration} > ${max_duration} + IF '${status}' == 'FAIL' BREAK + IF ${duration} > ${max_duration} BREAK END ${duration_compact}= DateTime.Convert Time ${duration} compact Log to console ${\n} Log To Console Execution stopped because: ${error_message} Log To Console Test executed for ${duration_compact} seconds - Run Keyword If '${status}' == 'FAIL' Fail ${error_message} + IF '${status}' == 'FAIL' Fail ${error_message}