Uploaded image for project: 'Bigtop'
  1. Bigtop
  2. BIGTOP-2478

Zookeeper does not have any smoke tests

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Component/s: deployment
    • Labels:
      None

      Description

      I would like to add a call to invoke the Zookeeper smoke tests in the Zookeeper charm that I'm writing, but the smoke tests don't yet exist.

      This ticket tracks the work to create basic smoke tests for Zookeeper.

        Issue Links

          Activity

          Hide
          petevg Pete Vander Giessen added a comment -

          I'm going to volunteer to do the work on this one ... if anybody has an advice or ideas, though, I'm all ears

          Show
          petevg Pete Vander Giessen added a comment - I'm going to volunteer to do the work on this one ... if anybody has an advice or ideas, though, I'm all ears
          Hide
          cos Konstantin Boudnik added a comment - - edited

          I would write a few lines of Groovy/Java code to add/remove a ZK treenode. This will immediately give you an idea if the ZK is up and working as expected.
          Check bigtop-tests/smoke-tests to see how it all organized.

          Show
          cos Konstantin Boudnik added a comment - - edited I would write a few lines of Groovy/Java code to add/remove a ZK treenode. This will immediately give you an idea if the ZK is up and working as expected. Check bigtop-tests/smoke-tests to see how it all organized.
          Hide
          petevg Pete Vander Giessen added a comment -

          Per @cos, marking this as a duplicate – we can submit the charm and the smoke test together.

          Show
          petevg Pete Vander Giessen added a comment - Per @cos, marking this as a duplicate – we can submit the charm and the smoke test together.
          Hide
          petevg Pete Vander Giessen added a comment -

          Per @cos, we do want this in a separate ticket, after all

          Show
          petevg Pete Vander Giessen added a comment - Per @cos, we do want this in a separate ticket, after all
          Hide
          rvs Roman Shaposhnik added a comment -

          Pete Vander Giessen first of all – count me in on helping with smoke tests (writing the code or reviewing or both ). As for the smokes, my suggestion would be to cover at least Java/C/C++ client bindings and REST interface (bonus points for zkperl and zkpython but I don't think those are super widely used).

          On the java side, I simply suggest we leverage ZK's systest code https://github.com/apache/zookeeper/tree/trunk/src/java/systest

          Thoughts?

          Show
          rvs Roman Shaposhnik added a comment - Pete Vander Giessen first of all – count me in on helping with smoke tests (writing the code or reviewing or both ). As for the smokes, my suggestion would be to cover at least Java/C/C++ client bindings and REST interface (bonus points for zkperl and zkpython but I don't think those are super widely used). On the java side, I simply suggest we leverage ZK's systest code https://github.com/apache/zookeeper/tree/trunk/src/java/systest Thoughts?
          Hide
          petevg Pete Vander Giessen added a comment -

          Roman Shaposhnik: Thank you for offering to help, and for the useful pointers to the tests already inside of Zookeeper

          I think that for the first round of tests, I'm going to keep things as simple as possible, possibly simply running the ZK systest routines.

          I'll code it up as just a normal Bigtop smoke test, though, so it will be easy to add to it as time goes on.

          Show
          petevg Pete Vander Giessen added a comment - Roman Shaposhnik : Thank you for offering to help, and for the useful pointers to the tests already inside of Zookeeper I think that for the first round of tests, I'm going to keep things as simple as possible, possibly simply running the ZK systest routines. I'll code it up as just a normal Bigtop smoke test, though, so it will be easy to add to it as time goes on.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user petevg opened a pull request:

          https://github.com/apache/bigtop/pull/122

          BIGTOP-2478: Zookeeper does not have any smoke tests

          These tests are very basic for now. We just run "zkServer.sh status" and
          verify that the output is reasonable.

          More complex tests are blocked by either a) needing multiple Zookeeper
          nodes (doesn't really make sense for a smoke test), or b) needing to
          have Zookeeper REST spun up, which Bigtop does not currently do.

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

          $ git pull https://github.com/juju-solutions/bigtop BIGTOP-2478

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

          https://github.com/apache/bigtop/pull/122.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 #122


          commit 0c507c05e3fd8dd3fc9d249823eac4bf66633e5c
          Author: Pete Vander Giessen <petevg@gmail.com>
          Date: 2016-06-16T19:46:50Z

          BIGTOP-2478: Zookeeper does not have any smoke tests

          These tests are very basic for now. We just run "zkServer.sh status" and
          verify that the output is reasonable.

          More complex tests are blocked by either a) needing multiple Zookeeper
          nodes (doesn't really make sense for a smoke test), or b) needing to
          have Zookeeper REST spun up, which Bigtop does not currently do.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user petevg opened a pull request: https://github.com/apache/bigtop/pull/122 BIGTOP-2478 : Zookeeper does not have any smoke tests These tests are very basic for now. We just run "zkServer.sh status" and verify that the output is reasonable. More complex tests are blocked by either a) needing multiple Zookeeper nodes (doesn't really make sense for a smoke test), or b) needing to have Zookeeper REST spun up, which Bigtop does not currently do. You can merge this pull request into a Git repository by running: $ git pull https://github.com/juju-solutions/bigtop BIGTOP-2478 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/bigtop/pull/122.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 #122 commit 0c507c05e3fd8dd3fc9d249823eac4bf66633e5c Author: Pete Vander Giessen <petevg@gmail.com> Date: 2016-06-16T19:46:50Z BIGTOP-2478 : Zookeeper does not have any smoke tests These tests are very basic for now. We just run "zkServer.sh status" and verify that the output is reasonable. More complex tests are blocked by either a) needing multiple Zookeeper nodes (doesn't really make sense for a smoke test), or b) needing to have Zookeeper REST spun up, which Bigtop does not currently do.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user rvs commented on a diff in the pull request:

          https://github.com/apache/bigtop/pull/122#discussion_r67440497

          — Diff: bigtop-tests/smoke-tests/zookeeper/TestZookeeper.groovy —
          @@ -0,0 +1,66 @@
          +/**
          + * 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.
          + */
          +
          +import org.junit.BeforeClass
          +import org.junit.AfterClass
          +
          +import org.apache.bigtop.itest.shell.Shell
          +import static org.junit.Assert.assertTrue
          +import org.junit.Test
          +import org.apache.commons.logging.LogFactory
          +import org.apache.commons.logging.Log
          +
          +import static org.apache.bigtop.itest.LogErrorsUtils.logError
          +
          +class TestSpark {
          — End diff –

          You probably don't want it to be called TestSpar, do you?

          Show
          githubbot ASF GitHub Bot added a comment - Github user rvs commented on a diff in the pull request: https://github.com/apache/bigtop/pull/122#discussion_r67440497 — Diff: bigtop-tests/smoke-tests/zookeeper/TestZookeeper.groovy — @@ -0,0 +1,66 @@ +/** + * 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. + */ + +import org.junit.BeforeClass +import org.junit.AfterClass + +import org.apache.bigtop.itest.shell.Shell +import static org.junit.Assert.assertTrue +import org.junit.Test +import org.apache.commons.logging.LogFactory +import org.apache.commons.logging.Log + +import static org.apache.bigtop.itest.LogErrorsUtils.logError + +class TestSpark { — End diff – You probably don't want it to be called TestSpar, do you?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user rvs commented on the issue:

          https://github.com/apache/bigtop/pull/122

          This looks good as a very, very basic ZK test. See the small nit I had tho.

          Show
          githubbot ASF GitHub Bot added a comment - Github user rvs commented on the issue: https://github.com/apache/bigtop/pull/122 This looks good as a very, very basic ZK test. See the small nit I had tho.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user petevg commented on the issue:

          https://github.com/apache/bigtop/pull/122

          @rvs: Whoops. Fixed the name. Thank you

          Show
          githubbot ASF GitHub Bot added a comment - Github user petevg commented on the issue: https://github.com/apache/bigtop/pull/122 @rvs: Whoops. Fixed the name. Thank you
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/bigtop/pull/122

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/bigtop/pull/122
          Hide
          rvs Roman Shaposhnik added a comment -

          Committed! Thanks for the patch!

          Show
          rvs Roman Shaposhnik added a comment - Committed! Thanks for the patch!

            People

            • Assignee:
              petevg Pete Vander Giessen
              Reporter:
              petevg Pete Vander Giessen
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development