Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.0
    • Component/s: client
    • Labels:
      None

      Description

      Now that we have MiniAccumuloCluster, we need to decide what we want to do with Mock Accumulo. Seems like there are two options for 1.5, either deperecate it or continue to maintain it. The main advantage of keeping it around is that its fast, however its behavior is not always correct (ACCUMULO-664, ACCUMULO-843, ACCUMULO-877). If we choose to deperecate it, we could probably close out the tickets against mock for 1.5.

      What are peoples thoughts?

        Activity

        Hide
        Hudson added a comment -

        Integrated in Accumulo-Trunk #635 (See https://builds.apache.org/job/Accumulo-Trunk/635/)
        ACCUMULO-878 removed "an" from comments (Revision 1432928)
        ACCUMULO-878 spelling/grammer (Revision 1432926)

        Result = SUCCESS
        kturner :
        Files :

        • /accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstance.java

        ecn :
        Files :

        • /accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstance.java
        Show
        Hudson added a comment - Integrated in Accumulo-Trunk #635 (See https://builds.apache.org/job/Accumulo-Trunk/635/ ) ACCUMULO-878 removed "an" from comments (Revision 1432928) ACCUMULO-878 spelling/grammer (Revision 1432926) Result = SUCCESS kturner : Files : /accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstance.java ecn : Files : /accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstance.java
        Hide
        Hudson added a comment -

        Integrated in Accumulo-Trunk #632 (See https://builds.apache.org/job/Accumulo-Trunk/632/)
        ACCUMULO-878 added some documentation for new users to mock accumulo about mini accumulo cluster (Revision 1432301)

        Result = SUCCESS
        kturner :
        Files :

        • /accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstance.java
        Show
        Hudson added a comment - Integrated in Accumulo-Trunk #632 (See https://builds.apache.org/job/Accumulo-Trunk/632/ ) ACCUMULO-878 added some documentation for new users to mock accumulo about mini accumulo cluster (Revision 1432301) Result = SUCCESS kturner : Files : /accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstance.java
        Hide
        Keith Turner added a comment -

        There does not seem to be a consensus for deprecating mock for 1.5. Could possibly reconsider at 1.6. Looking at the comments 2 were for deprecating 3 for not deprecating. I will add some javadocs to MocKInstance.

        Show
        Keith Turner added a comment - There does not seem to be a consensus for deprecating mock for 1.5. Could possibly reconsider at 1.6. Looking at the comments 2 were for deprecating 3 for not deprecating. I will add some javadocs to MocKInstance.
        Hide
        Keith Turner added a comment -

        I am going to try to figure out if MiniAccumuloCluster works on Windows and what can be done to make it faster.

        Show
        Keith Turner added a comment - I am going to try to figure out if MiniAccumuloCluster works on Windows and what can be done to make it faster.
        Hide
        Josh Elser added a comment -

        There were some issues previously inside of MockAccumulo that caused things to not run in mock but run correctly on a real instance. Until we have something that can provide an equivalent in-memory instance that can be used for testing, I'm hesitant to mark MockAccumulo as deprecated. Figuring out the actual scope/functionality of MiniAccumuloCluster is dependent on this, I believe.

        Show
        Josh Elser added a comment - There were some issues previously inside of MockAccumulo that caused things to not run in mock but run correctly on a real instance. Until we have something that can provide an equivalent in-memory instance that can be used for testing, I'm hesitant to mark MockAccumulo as deprecated. Figuring out the actual scope/functionality of MiniAccumuloCluster is dependent on this, I believe.
        Hide
        Christopher Tubbs added a comment -

        I like the idea of both. However, I do think that there are probably some "unit tests" that are really integration tests and should be tested against a real instance. Many such tests can be done during the integration-test phase of the build lifecycle (perhaps within the test module or a dedicated integration test module, if it will depend on other modules being built). MiniAccumuloCluster can be set up during the pre-integration-test phase and shut down during the post-integration-test phase, with maven-failsafe-plugin being used to run these tests previously treated as "unit tests". This can probably be done using maven-exec-plugin, but it might be easier to write a custom maven-mini-accumulo-cluster-plugin, like the maven-jetty-plugin, for launching/shutting down the MiniAccumuloCluster. If this option is pursued, I'm curious if there will still be any remaining need for mock... it might be easier to determine if we need this after we implement proper integration testing. If there's a problem running integration tests on Windows, that can probably be fixed.

        Show
        Christopher Tubbs added a comment - I like the idea of both. However, I do think that there are probably some "unit tests" that are really integration tests and should be tested against a real instance. Many such tests can be done during the integration-test phase of the build lifecycle (perhaps within the test module or a dedicated integration test module, if it will depend on other modules being built). MiniAccumuloCluster can be set up during the pre-integration-test phase and shut down during the post-integration-test phase, with maven-failsafe-plugin being used to run these tests previously treated as "unit tests". This can probably be done using maven-exec-plugin, but it might be easier to write a custom maven-mini-accumulo-cluster-plugin, like the maven-jetty-plugin, for launching/shutting down the MiniAccumuloCluster. If this option is pursued, I'm curious if there will still be any remaining need for mock... it might be easier to determine if we need this after we implement proper integration testing. If there's a problem running integration tests on Windows, that can probably be fixed.
        Hide
        Billie Rinaldi added a comment -

        I think using the file system is fine as long as it's all in the tmp directory.

        Show
        Billie Rinaldi added a comment - I think using the file system is fine as long as it's all in the tmp directory.
        Hide
        William Slacum added a comment -

        I'm leaning towards keeping it. There have been several behavioral differences between MockAccumulo and a real instance that can go undetected (and possibly remain undocumented), but I prefer to have some framework that is completely in memory and doesn't dirty the user's file system.

        Show
        William Slacum added a comment - I'm leaning towards keeping it. There have been several behavioral differences between MockAccumulo and a real instance that can go undetected (and possibly remain undocumented), but I prefer to have some framework that is completely in memory and doesn't dirty the user's file system.
        Hide
        Keith Turner added a comment -

        used extensively for testing complicated iterator stacks

        One benefit of doing this type of testing with MiniAccumuloCluster is that you may test continuance case where your iterator is reseeked.

        Show
        Keith Turner added a comment - used extensively for testing complicated iterator stacks One benefit of doing this type of testing with MiniAccumuloCluster is that you may test continuance case where your iterator is reseeked.
        Hide
        Keith Turner added a comment -

        One more thing to consider if we continue to maintain mock is user experience. A new user comes to this project and sees two possibilities for they could use for testing. Its confusing. This can be solved with adequate documentation that outlines the pros and cons of each to help the user make a decision.

        Show
        Keith Turner added a comment - One more thing to consider if we continue to maintain mock is user experience. A new user comes to this project and sees two possibilities for they could use for testing. Its confusing. This can be solved with adequate documentation that outlines the pros and cons of each to help the user make a decision.
        Hide
        Keith Turner added a comment -

        even for those poor souls who develop on Windows

        I am not sure if MiniAccumuloCluster will work on Windows. I have never tried it. Need to test that.

        Show
        Keith Turner added a comment - even for those poor souls who develop on Windows I am not sure if MiniAccumuloCluster will work on Windows. I have never tried it. Need to test that.
        Hide
        Eric Newton added a comment -

        It is faster, and it works for in-memory unit tests, even for those poor souls who develop on Windows (eew). I know that it is used extensively for testing complicated iterator stacks. Perhaps Josh and/or Bill would like to chime in.

        Show
        Eric Newton added a comment - It is faster, and it works for in-memory unit tests, even for those poor souls who develop on Windows (eew). I know that it is used extensively for testing complicated iterator stacks. Perhaps Josh and/or Bill would like to chime in.
        Hide
        Billie Rinaldi added a comment -

        I'd be in favor of deprecating mock accumulo.

        Show
        Billie Rinaldi added a comment - I'd be in favor of deprecating mock accumulo.
        Hide
        Keith Turner added a comment -

        I am leaning twoards deprecating mock accumulo.

        There are some unit test in accumulo-core and accumulo-server that use mock accumulo. MiniAccumuloCluster is in the accumulo-test module which depends on accumlo-core and accumulo-server. So I think the unit test in accumulo that use mock would need to move to accumulo-test.

        Show
        Keith Turner added a comment - I am leaning twoards deprecating mock accumulo. There are some unit test in accumulo-core and accumulo-server that use mock accumulo. MiniAccumuloCluster is in the accumulo-test module which depends on accumlo-core and accumulo-server. So I think the unit test in accumulo that use mock would need to move to accumulo-test.

          People

          • Assignee:
            Keith Turner
            Reporter:
            Keith Turner
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development