From 684092bae1db503c632f0d6214d8e19a1af64b35 Mon Sep 17 00:00:00 2001
From: cody burkard <cody@onlab.us>
Date: Sat, 27 Sep 2014 06:43:39 -0700
Subject: [PATCH] wait for switches to connect during test_nets

---
 mininet/test/test_nets.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mininet/test/test_nets.py b/mininet/test/test_nets.py
index 330e9a88..1a199c82 100755
--- a/mininet/test/test_nets.py
+++ b/mininet/test/test_nets.py
@@ -23,14 +23,15 @@ class testSingleSwitchCommon( object ):
 
     def testMinimal( self ):
         "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 )
         self.assertEqual( dropped, 0 )
 
     def testSingle5( self ):
         "Ping test on 5-host single-switch topology"
         mn = Mininet( SingleSwitchTopo( k=5 ), self.switchClass, Host,
-                      Controller )
+                      Controller, waitConnected=True )
         dropped = mn.run( mn.ping )
         self.assertEqual( dropped, 0 )
 
-- 
GitLab