File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -736,6 +736,23 @@ def test104_reconnect_restore(self):
736
736
l2 = pickle .loads (l1_state )
737
737
self .assertEqual (l2 .whoami_s (), 'dn:' + bind_dn )
738
738
739
+ def test105_reconnect_restore (self ):
740
+ l1 = self .ldap_object_class (self .server .ldap_uri , retry_max = 2 , retry_delay = 1 )
741
+ bind_dn = 'cn=user1,' + self .server .suffix
742
+ l1 .simple_bind_s (bind_dn , 'user1_pw' )
743
+ self .assertEqual (l1 .whoami_s (), 'dn:' + bind_dn )
744
+ self .server ._proc .terminate ()
745
+ self .server .wait ()
746
+ try :
747
+ l1 .whoami_s ()
748
+ except ldap .SERVER_DOWN :
749
+ pass
750
+ else :
751
+ self .assertEqual (True , False )
752
+ finally :
753
+ self .server ._start_slapd ()
754
+ self .assertEqual (l1 .whoami_s (), 'dn:' + bind_dn )
755
+
739
756
740
757
if __name__ == '__main__' :
741
758
unittest .main ()
You can’t perform that action at this time.
0 commit comments