File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed
java/src/org/openqa/selenium/grid/node Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -199,13 +199,13 @@ public class NodeFlags implements HasRoles {
199199 public int registerPeriod = DEFAULT_REGISTER_PERIOD ;
200200
201201 @ Parameter (
202- names = "--register-loopback " ,
202+ names = "--register-shutdown-on-failure " ,
203203 description =
204- "If enable this flag, after register period is completed , the Node will shutdown itself ."
204+ "If this flag is enabled , the Node will shut down after the register period is completed ."
205205 + " This is useful for container environments to restart and register again. If"
206- + " restart multiple times, Node container status will be CrashLoopBackOff." )
207- @ ConfigValue (section = NODE_SECTION , name = "register-loopback " , example = "false" )
208- public boolean registerLoopBack = false ;
206+ + " restarted multiple times, the Node container status will be CrashLoopBackOff." )
207+ @ ConfigValue (section = NODE_SECTION , name = "register-shutdown-on-failure " , example = "false" )
208+ public boolean registerShutdownOnFailure = false ;
209209
210210 @ Parameter (
211211 names = "--heartbeat-period" ,
Original file line number Diff line number Diff line change @@ -205,8 +205,8 @@ public Duration getRegisterPeriod() {
205205 return Duration .ofSeconds (seconds );
206206 }
207207
208- public boolean getRegisterLoopBack () {
209- return config .getBool (NODE_SECTION , "register-loopback " ).orElse (false );
208+ public boolean getRegisterShutdownOnFailure () {
209+ return config .getBool (NODE_SECTION , "register-shutdown-on-failure " ).orElse (false );
210210 }
211211
212212 public Duration getHeartbeatPeriod () {
Original file line number Diff line number Diff line change @@ -219,10 +219,11 @@ public NettyServer start() {
219219 .onFailure (
220220 event -> {
221221 LOG .severe (
222- String .format (
223- "Registration event failed after period of %s seconds. Node will not attempt to register again." ,
224- nodeOptions .getRegisterPeriod ().getSeconds ()));
225- if (nodeOptions .getRegisterLoopBack ()) {
222+ String .format (
223+ "Registration event failed after period of %s seconds. Node will not"
224+ + " attempt to register again" ,
225+ nodeOptions .getRegisterPeriod ().getSeconds ()));
226+ if (nodeOptions .getRegisterShutdownOnFailure ()) {
226227 LOG .severe ("Shutting down" );
227228 System .exit (1 );
228229 }
You can’t perform that action at this time.
0 commit comments