@@ -17,7 +17,7 @@ use std::{
1717 time:: { Duration , Instant } ,
1818} ;
1919
20- use neqo_common:: { Datagram , Decoder , qdebug} ;
20+ use neqo_common:: { Datagram , Decoder , event :: Provider as _ , qdebug} ;
2121use test_fixture:: {
2222 DEFAULT_ADDR , DEFAULT_ADDR_V4 ,
2323 assertions:: { assert_v4_path, assert_v6_path} ,
@@ -31,8 +31,9 @@ use super::{
3131 zero_len_cid_client,
3232} ;
3333use crate :: {
34- CloseReason , ConnectionId , ConnectionIdDecoder as _, ConnectionIdGenerator , ConnectionIdRef ,
35- ConnectionParameters , EmptyConnectionIdGenerator , Error , MIN_INITIAL_PACKET_SIZE ,
34+ CloseReason , ConnectionEvent , ConnectionId , ConnectionIdDecoder as _, ConnectionIdGenerator ,
35+ ConnectionIdRef , ConnectionParameters , EmptyConnectionIdGenerator , Error ,
36+ MIN_INITIAL_PACKET_SIZE ,
3637 cid:: ConnectionIdManager ,
3738 connection:: tests:: {
3839 assert_path_challenge_min_len, connect, send_something_paced, send_with_extra,
@@ -434,6 +435,11 @@ fn migrate_immediate() {
434435 client
435436 . migrate ( Some ( DEFAULT_ADDR_V4 ) , Some ( DEFAULT_ADDR_V4 ) , true , now)
436437 . unwrap ( ) ;
438+ assert ! ( client. events( ) . any( |e| matches!(
439+ e,
440+ ConnectionEvent :: PathMigrated { local, remote }
441+ if local == DEFAULT_ADDR_V4 && remote == DEFAULT_ADDR_V4
442+ ) ) ) ;
437443
438444 let client1 = send_something ( & mut client, now) ;
439445 assert_v4_path ( & client1, true ) ; // Contains PATH_CHALLENGE.
@@ -447,6 +453,11 @@ fn migrate_immediate() {
447453 // The server accepts the first packet and migrates (but probes).
448454 let server1 = server. process ( Some ( client1) , now) . dgram ( ) . unwrap ( ) ;
449455 assert_v4_path ( & server1, true ) ;
456+ assert ! (
457+ server
458+ . events( )
459+ . any( |e| matches!( e, ConnectionEvent :: PathMigrated { .. } ) )
460+ ) ;
450461 let server2 = server. process_output ( now) . dgram ( ) . unwrap ( ) ;
451462 assert_v6_path ( & server2, true ) ;
452463
@@ -655,6 +666,11 @@ fn migration(mut client: Connection) {
655666
656667 // Once the client receives the probe response, it migrates to the new path.
657668 client. process_input ( resp, now) ;
669+ assert ! ( client. events( ) . any( |e| matches!(
670+ e,
671+ ConnectionEvent :: PathMigrated { local, remote }
672+ if local == DEFAULT_ADDR_V4 && remote == DEFAULT_ADDR_V4
673+ ) ) ) ;
658674 assert_eq ! ( client. stats( ) . frame_rx. path_challenge, 1 ) ;
659675 let migrate_client = send_something ( & mut client, now) ;
660676 assert_v4_path ( & migrate_client, true ) ; // Responds to server probe.
0 commit comments