mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-12-24 22:37:03 +00:00
lf_check.py : added 15 second sleep after loading a lanforge db
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -610,8 +610,11 @@ NOTE: Diagrams are links in dashboard""".format(ip_qa=ip,qa_url=qa_url)
|
||||
out, err = process.communicate()
|
||||
errcode = process.returncode
|
||||
print("load_FACTORY_DFLT_database errcode: {errcode}".format(errcode=errcode))
|
||||
# DO NOT REMOVE 15 second sleep.
|
||||
# After every DB load, the loed changes are applied, and part of the apply is to re-build
|
||||
# The underlying netsmith objects
|
||||
sleep(15)
|
||||
|
||||
# not currently used
|
||||
def load_BLANK_database(self):
|
||||
try:
|
||||
os.chdir(self.scripts_wd)
|
||||
@@ -626,7 +629,10 @@ NOTE: Diagrams are links in dashboard""".format(ip_qa=ip,qa_url=qa_url)
|
||||
out, err = process.communicate()
|
||||
errcode = process.returncode
|
||||
print("load_BLANK_database errcode: {errcode}".format(errcode=errcode))
|
||||
|
||||
# DO NOT REMOVE 15 second sleep.
|
||||
# After every DB load, the loed changes are applied, and part of the apply is to re-build
|
||||
# The underlying netsmith objects
|
||||
sleep(15)
|
||||
|
||||
def load_custom_database(self, custom_db):
|
||||
try:
|
||||
@@ -642,6 +648,10 @@ NOTE: Diagrams are links in dashboard""".format(ip_qa=ip,qa_url=qa_url)
|
||||
out, err = process.communicate()
|
||||
errcode = process.returncode
|
||||
print("load_custome_database errcode: {errcode}".format(errcode=errcode))
|
||||
# DO NOT REMOVE 15 second sleep.
|
||||
# After every DB load, the loed changes are applied, and part of the apply is to re-build
|
||||
# The underlying netsmith objects
|
||||
sleep(15)
|
||||
|
||||
def run_script_test(self):
|
||||
self.start_html_results()
|
||||
@@ -765,25 +775,19 @@ NOTE: Diagrams are links in dashboard""".format(ip_qa=ip,qa_url=qa_url)
|
||||
self.logger.info("no load_db present in dictionary, load db normally")
|
||||
if self.use_factory_default_db == "TRUE":
|
||||
self.load_FACTORY_DFLT_database()
|
||||
sleep(3)
|
||||
self.logger.info("FACTORY_DFLT loaded between tests with scenario.py --load FACTORY_DFLT")
|
||||
if self.use_blank_db == "TRUE":
|
||||
self.load_BLANK_database()
|
||||
sleep(1)
|
||||
self.logger.info("BLANK loaded between tests with scenario.py --load BLANK")
|
||||
if self.use_custom_db == "TRUE":
|
||||
try:
|
||||
self.load_custom_database(self.custom_db)
|
||||
sleep(1)
|
||||
self.logger.info("{} loaded between tests with scenario.py --load {}".format(self.custom_db,
|
||||
self.custom_db))
|
||||
self.logger.info("{} loaded between tests with scenario.py --load {}".format(self.custom_db,self.custom_db))
|
||||
except:
|
||||
self.logger.info("custom database failed to load check existance and location: {}".format(
|
||||
self.custom_db))
|
||||
self.logger.info("custom database failed to load check existance and location: {}".format(self.custom_db))
|
||||
else:
|
||||
self.logger.info("no db loaded between tests: {}".format(self.use_custom_db))
|
||||
|
||||
sleep(1) # DO NOT REMOVE the sleep is to allow for the database to stablize
|
||||
try:
|
||||
os.chdir(self.scripts_wd)
|
||||
# self.logger.info("Current Working Directory {}".format(os.getcwd()))
|
||||
|
||||
Reference in New Issue
Block a user