You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by PurelyApplied <gi...@git.apache.org> on 2017/05/31 16:43:44 UTC

[GitHub] geode pull request #551: GEODE-2971: consistency in shell exit codes for sta...

GitHub user PurelyApplied opened a pull request:

    https://github.com/apache/geode/pull/551

    GEODE-2971: consistency in shell exit codes for status commands.

    * Replaced all System.exit parameters with ShellExitCode references for extensibility
    * Added FakeLaunchers to Locator- and ServerStarterRules to spoof member status and to register the instance to the Launcher class.  The spoofed status is of mixed reliability and only used when connected via jmx (via `--name`, not `--dir` or `--pid`).
    * Expanded starter rules to spawn PID files in working directory.
    * Made `getMemberMXBean` static, added public `isMemberMXBeanAvailable` to allow tests to delay tests until server is ready.
    * Code cleanup of touched files.
    
    Precheckin ran nearly-fully-green.  One test failure which I suspect to be unrelated to these changes.  This test passed cleanly when run with `gradlew -distributedTest.single=...`.  Currently rerunning DUnits together to verify.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/PurelyApplied/geode gem-1370

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/geode/pull/551.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #551
    
----
commit 91ee3d79102fafa9521a219aa8d3527bea519922
Author: Patrick Rhomberg <pr...@pivotal.io>
Date:   2017-05-30T21:25:47Z

    GEODE-2971: consistency in shell exit codes for status commands.
    
    * Replaced all System.exit calls with ShellExitCode references for extensibility
    * Added FakeLaunchers to Locator- and ServerStarterRules to spoof member status made via jmx (not --pid or --dir options)
    * Expanded starter rules to spawn PID files
    * Made getMemberMXBean static, made public isMemberMXBeanAvailable to delay tests until server is ready.
    * Code cleanup of touched files.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] geode pull request #551: GEODE-2971: consistency in shell exit codes for sta...

Posted by jaredjstewart <gi...@git.apache.org>.
Github user jaredjstewart commented on a diff in the pull request:

    https://github.com/apache/geode/pull/551#discussion_r119419341
  
    --- Diff: geode-core/src/main/java/org/apache/geode/internal/ShellExitCode.java ---
    @@ -0,0 +1,40 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
    + * agreements. See the NOTICE file distributed with this work for additional information regarding
    + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance with the License. You may obtain a
    + * copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software distributed under the License
    + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
    + * or implied. See the License for the specific language governing permissions and limitations under
    + * the License.
    + */
    +package org.apache.geode.internal;
    +
    +public class ShellExitCode {
    --- End diff --
    
    This should be an `enum` rather than a `class`.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] geode pull request #551: GEODE-2971: consistency in shell exit codes for sta...

Posted by PurelyApplied <gi...@git.apache.org>.
Github user PurelyApplied closed the pull request at:

    https://github.com/apache/geode/pull/551


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] geode issue #551: GEODE-2971: consistency in shell exit codes for status com...

Posted by PurelyApplied <gi...@git.apache.org>.
Github user PurelyApplied commented on the issue:

    https://github.com/apache/geode/pull/551
  
    After significant testing redesign, this PR will be closed.  The ticket will be resolved after additional `@Rule` resources are added that more accurately represent real `gfsh` usage.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] geode pull request #551: GEODE-2971: consistency in shell exit codes for sta...

Posted by jaredjstewart <gi...@git.apache.org>.
Github user jaredjstewart commented on a diff in the pull request:

    https://github.com/apache/geode/pull/551#discussion_r119420029
  
    --- Diff: geode-core/src/main/java/org/apache/geode/internal/ShellExitCode.java ---
    @@ -0,0 +1,40 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
    + * agreements. See the NOTICE file distributed with this work for additional information regarding
    + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance with the License. You may obtain a
    + * copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software distributed under the License
    + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
    + * or implied. See the License for the specific language governing permissions and limitations under
    + * the License.
    + */
    +package org.apache.geode.internal;
    +
    +public class ShellExitCode {
    --- End diff --
    
    E.g. 
    
    ```
     public enum ShellExitCode {
        NORMAL(0),FATAL(1), INVALID(1);
    
        private MyEnum(int exitCode) {
          this.exitCode = exitCode;
        }
    
        private int exitCode;
        
        public int getExitCode(){
          return this.exitCode;
        }
      }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---