File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ Released 2.4.46 2017-11-xx
4
4
Changes since 2.4.45:
5
5
6
6
Lib/
7
- *
7
+ * slapdtest.SlapdObject.restart() just restarts slapd
8
+ without cleaning any data
8
9
9
10
Tests/
10
11
*
Original file line number Diff line number Diff line change @@ -285,7 +285,9 @@ def start(self):
285
285
)
286
286
287
287
def stop (self ):
288
- """Stops the slapd server, and waits for it to terminate"""
288
+ """
289
+ Stops the slapd server, and waits for it to terminate and cleans up
290
+ """
289
291
if self ._proc is not None :
290
292
self ._log .debug ('stopping slapd with pid %d' , self ._proc .pid )
291
293
self ._proc .terminate ()
@@ -294,11 +296,11 @@ def stop(self):
294
296
295
297
def restart (self ):
296
298
"""
297
- Restarts the slapd server; ERASING previous content.
298
- Starts the server even it if isn't already running.
299
+ Restarts the slapd server with same data
299
300
"""
300
- self .stop ()
301
- self .start ()
301
+ self ._proc .terminate ()
302
+ self .wait ()
303
+ self ._start_slapd ()
302
304
303
305
def wait (self ):
304
306
"""Waits for the slapd process to terminate by itself."""
@@ -309,7 +311,7 @@ def wait(self):
309
311
def _stopped (self ):
310
312
"""Called when the slapd server is known to have terminated"""
311
313
if self ._proc is not None :
312
- self ._log .info ('slapd terminated' )
314
+ self ._log .info ('slapd[%d] terminated' , self . _proc . pid )
313
315
self ._proc = None
314
316
315
317
def _cli_auth_args (self ):
You can’t perform that action at this time.
0 commit comments