wait for switches to connect during test_nets

This commit is contained in:
cody burkard
2014-09-27 06:43:39 -07:00
parent 9487cb508d
commit 684092bae1
+3 -2
View File
@@ -23,14 +23,15 @@ class testSingleSwitchCommon( object ):
def testMinimal( self ): def testMinimal( self ):
"Ping test on minimal topology" "Ping test on minimal topology"
mn = Mininet( SingleSwitchTopo(), self.switchClass, Host, Controller ) mn = Mininet( SingleSwitchTopo(), self.switchClass, Host, Controller,
waitConnected=True )
dropped = mn.run( mn.ping ) dropped = mn.run( mn.ping )
self.assertEqual( dropped, 0 ) self.assertEqual( dropped, 0 )
def testSingle5( self ): def testSingle5( self ):
"Ping test on 5-host single-switch topology" "Ping test on 5-host single-switch topology"
mn = Mininet( SingleSwitchTopo( k=5 ), self.switchClass, Host, mn = Mininet( SingleSwitchTopo( k=5 ), self.switchClass, Host,
Controller ) Controller, waitConnected=True )
dropped = mn.run( mn.ping ) dropped = mn.run( mn.ping )
self.assertEqual( dropped, 0 ) self.assertEqual( dropped, 0 )