fixes for LinkDelay test in test_hifi
This commit is contained in:
+3
-1
@@ -888,7 +888,9 @@ class UserSwitch( Switch ):
|
||||
|
||||
def connected( self ):
|
||||
"Is the switch connected to a controller?"
|
||||
return 'remote.is-connected=true' in self.dpctl( 'status' )
|
||||
status = self.dpctl( 'status' )
|
||||
return ( 'remote.is-connected=true' in status and
|
||||
'local.is-connected=true' in status )
|
||||
|
||||
@staticmethod
|
||||
def TCReapply( intf ):
|
||||
|
||||
@@ -97,11 +97,15 @@ class testOptionsTopoCommon( object ):
|
||||
"Verify that link delays are accurate within a bound."
|
||||
DELAY_MS = 15
|
||||
DELAY_TOLERANCE = 0.8 # Delay fraction below which test should fail
|
||||
REPS = 3
|
||||
lopts = { 'delay': '%sms' % DELAY_MS, 'use_htb': True }
|
||||
mn = Mininet( SingleSwitchOptionsTopo( n=N, lopts=lopts ),
|
||||
link=TCLink, switch=self.switchClass, autoStaticArp=True,
|
||||
waitConnected=True )
|
||||
ping_delays = mn.run( mn.pingFull )
|
||||
mn.start()
|
||||
for _ in range( REPS ):
|
||||
ping_delays = mn.pingFull()
|
||||
mn.stop()
|
||||
test_outputs = ping_delays[0]
|
||||
# Ignore unused variables below
|
||||
# pylint: disable-msg=W0612
|
||||
|
||||
Reference in New Issue
Block a user