Commit 3f3b72c
Srikanth B R
Bug30799097 MTR: ADD SUPPORT TO STOP AND START SECONDARY ENGINE SERVERS WITHIN TESTS
Issue
=====
If one or more secondary engine server nodes go down during
execution of a test, it is interpreted as a failure. However,
there may be cases where one actually wants to stop and possibly
restart one or more secondary engine servers intentionally.
Fix
===
A mechanism to let the system know if the test expects
secondary server(s) to terminate, and to either wait or have
it restarted immediately has been implemented.
Before the action that will stop the server is initiated, the
test case should write either "wait" or "restart" to the file
"$MYSQLTEST_VARDIR/tmp/<secondary_server_name>.<server_id>.expect".
If "restart" is written into this file, the server will be
immediately restarted. If "wait" is written instead, the server
will remain down, but can be restarted at a later time by
writing "restart" to the same file.
In addition, the patch also includes writing the PID of the
safe_process instance for each secondary engine server (i.e.,
the process which spawns and monitors the secondary engine
server's process) to a file in the MTR run directory i.e.,
"$MYSQLTEST_VARDIR/run/<secondary_server_name>.<server_id>.pid".
This can inturn be used to terminate an individual secondary
server process within tests by sending an appropriate signal.
Change-Id: I3c4d4a810f7389d06f8a3b3134fbc54a2bfae4161 parent 310d8be commit 3f3b72c
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5553 | 5553 | | |
5554 | 5554 | | |
5555 | 5555 | | |
5556 | | - | |
| 5556 | + | |
5557 | 5557 | | |
5558 | 5558 | | |
5559 | 5559 | | |
| |||
5631 | 5631 | | |
5632 | 5632 | | |
5633 | 5633 | | |
| 5634 | + | |
| 5635 | + | |
| 5636 | + | |
| 5637 | + | |
5634 | 5638 | | |
5635 | 5639 | | |
5636 | 5640 | | |
| |||
0 commit comments