regress: add delays after switch config

Some OpenFlow switches need time to process switch config messages.
Sleep with user-specifiable delay.

Change submitted by: Jean Tourrilhes <jt@hpl.hp.com>
This commit is contained in:
Glen Gibb committed 2010-03-10 16:27:41 -08:00
1 parent 9bcf899001
commit b585b4c1aa
2 files changed
+6

No files matched your search

@@ -11,6 +11,9 @@ sub verify_packet_in {
my $in_port = $$options_ref{'port_base'};
my $out_port = $in_port + 1;
# Give OF switch time to process the set_config
usleep($$options_ref{'send_delay'});
my $pkt = get_default_black_box_pkt_len($in_port, $out_port, $pktsiz);
nftest_send('eth1', $pkt->packed);
@@ -27,6 +27,9 @@ sub my_test {
set_config($ofp, $sock, $options_ref, $flags, $miss_send_len);
# Give OF switch time to process the set_config
usleep($$options_ref{'send_delay'});
$msg = get_config( $ofp, $sock );
compare( "miss send len", $$msg{'miss_send_len'}, '==', $miss_send_len );