Skip to content

Commit

Permalink
Merge pull request FRRouting#15903 from y-bharath14/srib-topotests-v1
Browse files Browse the repository at this point in the history
tests: catch exception during switch shutdown
  • Loading branch information
riw777 authored Oct 8, 2024
2 parents 4bf780f + 5118fd1 commit 382e4e9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/topotests/lib/topogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,16 @@ def stop_topology(self):
"Errors found post shutdown - details follow: {}".format(errors)
)

self.net.stop()
try:
self.net.stop()

except OSError as error:
# OSError exception is raised when mininet tries to stop switch
# though switch is stopped once but mininet tries to stop same
# switch again, where it ended up with exception

logger.info(error)
logger.info("Exception ignored: switch is already stopped")

def get_exabgp_cmd(self):
if not self.exabgp_cmd:
Expand Down

0 comments on commit 382e4e9

Please sign in to comment.