Skip to content

Commit 422787e

Browse files
committed
added some logging and made an improvement to get_master_and_backupRouter method
1 parent 55067a8 commit 422787e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/integration/component/maint/test_redundant_router.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ def setUpClass(cls):
146146
cls.zone.id,
147147
cls.testdata["ostype"]
148148
)
149+
149150
cls.testdata["small"]["zoneid"] = cls.zone.id
150151
cls.testdata["small"]["template"] = cls.template.id
151152

@@ -1546,6 +1547,8 @@ def get_master_and_backupRouter(self):
15461547
listall=True
15471548
)
15481549
retry = retry-1
1550+
if len(routers) < 2:
1551+
continue
15491552
if not (routers[0].redundantstate == 'MASTER' or routers[1].redundantstate == 'MASTER'):
15501553
continue;
15511554
if routers[0].redundantstate == 'MASTER':
@@ -1556,6 +1559,7 @@ def get_master_and_backupRouter(self):
15561559
master_router = routers[1]
15571560
backup_router = routers[0]
15581561
break
1562+
self.info("master_router: %s, backup_router: %s" % (master_router, backup_router))
15591563
return master_router, backup_router
15601564

15611565

0 commit comments

Comments
 (0)