@@ -93,12 +93,16 @@ impl Future for ServerInitializerReal {
93
93
type Error = ( ) ;
94
94
95
95
fn poll ( & mut self ) -> Result < Async < <Self as Future >:: Item > , <Self as Future >:: Error > {
96
- // try_ready!(self
97
- // .dns_socket_server
98
- // .as_mut()
99
- // .join(self.bootstrapper.as_mut())
100
- // .poll());
101
- try_ready ! ( self . bootstrapper. as_mut( ) . poll( ) ) ;
96
+ match self . is_entry_dns_enabled {
97
+ true => {
98
+ try_ready ! ( self
99
+ . dns_socket_server
100
+ . as_mut( )
101
+ . join( self . bootstrapper. as_mut( ) )
102
+ . poll( ) ) ;
103
+ }
104
+ false => try_ready ! ( self . bootstrapper. as_mut( ) . poll( ) ) ,
105
+ }
102
106
Ok ( Async :: Ready ( ( ) ) )
103
107
}
104
108
}
@@ -798,8 +802,7 @@ pub mod tests {
798
802
}
799
803
800
804
#[ test]
801
- // TODO: GH-525: It should panic
802
- // #[should_panic(expected = "EntryDnsServerMock was instructed to panic")]
805
+ #[ should_panic( expected = "EntryDnsServerMock was instructed to panic" ) ]
803
806
fn server_initializer_dns_socket_server_panics ( ) {
804
807
let bootstrapper = CrashTestDummy :: new ( CrashPoint :: None , BootstrapperConfig :: new ( ) ) ;
805
808
let privilege_dropper = PrivilegeDropperMock :: new ( ) ;
@@ -813,7 +816,7 @@ pub mod tests {
813
816
bootstrapper : Box :: new ( bootstrapper) ,
814
817
privilege_dropper : Box :: new ( privilege_dropper) ,
815
818
dirs_wrapper : Box :: new ( dirs_wrapper) ,
816
- is_entry_dns_enabled : false ,
819
+ is_entry_dns_enabled : true ,
817
820
} ;
818
821
819
822
let _ = subject. poll ( ) ;
0 commit comments