@@ -127,7 +127,7 @@ function Server:new(object, extra)
127
127
if not object .tests [t .name ] then
128
128
object .tests [t .name ] = t
129
129
t .servers [object .id ] = object
130
- log .info (' Server %s used in %s test' , object .alias , t .name )
130
+ log .info (' Server %q used in %s test' , object .alias , t .name )
131
131
end
132
132
end
133
133
return v (... )
@@ -461,7 +461,7 @@ function Server:start(opts)
461
461
self :wait_until_ready ()
462
462
end
463
463
464
- log .info (' Server %s (pid: %d) started' , self .alias , self .process .pid )
464
+ log .info (' Server %q (pid: %d) started' , self .alias , self .process .pid )
465
465
end
466
466
467
467
--- Restart the server with the given parameters.
@@ -495,7 +495,7 @@ function Server:restart(params, opts)
495
495
}, {wait_until_ready = ' ?boolean' })
496
496
497
497
if not self .process then
498
- log .warn (' Cannot restart server %s since its process not started' , self .alias )
498
+ log .warn (' Cannot restart server %q since its process not started' , self .alias )
499
499
end
500
500
self :stop ()
501
501
@@ -504,7 +504,7 @@ function Server:restart(params, opts)
504
504
end
505
505
506
506
self :start (opts )
507
- log .info (' Server %s (pid: %d) restarted' , self .alias , self .process .pid )
507
+ log .info (' Server %q (pid: %d) restarted' , self .alias , self .process .pid )
508
508
end
509
509
510
510
-- Save server artifacts by copying the working directory.
513
513
-- following string: `Failed to copy artifacts for server (alias: <alias>, workdir: <workdir>)`.
514
514
function Server :save_artifacts ()
515
515
if self .artifacts_saved then
516
- log .info (' Artifacts of server %s already saved to %s' , self .alias , self .artifacts )
516
+ log .info (' Artifacts of server %q already saved to %s' , self .alias , self .artifacts )
517
517
return
518
518
end
519
519
local ok , err = fio .copytree (self .workdir , self .artifacts )
@@ -522,15 +522,15 @@ function Server:save_artifacts()
522
522
:format (self .alias , fio .basename (self .workdir ))
523
523
log .error ((' %s: %s' ):format (self .artifacts , err ))
524
524
end
525
- log .info (' Artifacts of server %s saved from %s to %s' ,
525
+ log .info (' Artifacts of server %q saved from %s to %s' ,
526
526
self .alias , self .workdir , self .artifacts )
527
527
self .artifacts_saved = true
528
528
end
529
529
530
530
-- Wait until the given condition is `true` (anything except `false` and `nil`).
531
531
-- Throws an error when the server process is terminated or timeout exceeds.
532
532
local function wait_for_condition (cond_desc , server , func , ...)
533
- log .info (' Wait for %s condition for server %s (pid: %d) within %d sec' ,
533
+ log .info (' Wait for %q condition for server %q (pid: %d) within %d sec' ,
534
534
cond_desc , server .alias , server .process .pid , WAIT_TIMEOUT )
535
535
local deadline = clock .time () + WAIT_TIMEOUT
536
536
while true do
@@ -559,7 +559,7 @@ function Server:stop()
559
559
self :coverage (' shutdown' )
560
560
end
561
561
self .net_box :close ()
562
- log .info (' Connection to server %s (pid: %d) closed' , self .alias , self .process .pid )
562
+ log .info (' Connection to server %q (pid: %d) closed' , self .alias , self .process .pid )
563
563
self .net_box = nil
564
564
end
565
565
@@ -582,7 +582,7 @@ function Server:stop()
582
582
error ((' Memory leak during process execution (alias: %s, workdir: %s, pid: %s)\n %s' )
583
583
:format (self .alias , workdir , pid , stderr ))
584
584
end
585
- log .info (' Process of server %s (pid: %d) killed' , self .alias , self .process .pid )
585
+ log .info (' Process of server %q (pid: %d) killed' , self .alias , self .process .pid )
586
586
self .process = nil
587
587
end
588
588
end
@@ -895,7 +895,7 @@ function Server:grep_log(pattern, bytes_num, opts)
895
895
return rawget (_G , ' box_cfg_log_file' ) or box .cfg .log end )
896
896
local file = fio .open (filename , {' O_RDONLY' , ' O_NONBLOCK' })
897
897
898
- log .info (' Trying to grep %s in server\' s log file %s' , pattern , filename )
898
+ log .info (' Trying to grep %q in server\' s log file %s' , pattern , filename )
899
899
900
900
local function fail (msg )
901
901
local err = errno .strerror ()
0 commit comments