You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by lewismc <gi...@git.apache.org> on 2015/10/05 06:33:43 UTC

[GitHub] gora pull request: GORA-240 Tests for MemStore

GitHub user lewismc opened a pull request:

    https://github.com/apache/gora/pull/45

    GORA-240 Tests for MemStore

    Hi Folks,
    This PR is not 100% yet and I wanted to post it to kick off some conversation regarding behavior of MemStore. First though, this PR
     * Fixes issues with [GORA-446](https://issues.apache.org/jira/browse/GORA-446)
     * Fixes [GORA-125](https://issues.apache.org/jira/browse/GORA-125) making logging libraries consistent across the codebase and modules.
     * Implements logic for query execution and results generation please see MemStore#execute
     * Finally, addresses [GORA-240](https://issues.apache.org/jira/browse/GORA-240) We have to @Ignore testDeleteByQueryFields and implement testMemStoreDeleteByQueryFields which is basically the same test however we explicitly set the start and end keys for the Query.
    This PR is not 100% yet there are two tests which are currently failing however I wanted to put the code here for us to talk about MemStore behaviour. 


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

    $ git pull https://github.com/lewismc/gora GORA-240

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

    https://github.com/apache/gora/pull/45.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 #45
    
----
commit 11b1d7accbe787010218152b6eb25b17ecbe5809
Author: Lewis John McGibbney <le...@jpl.nasa.gov>
Date:   2015-10-03T19:52:21Z

    GORA-240 Tests for MemStore

commit 209d6632cb98a6c76a3c634f94222cb8b0d135ed
Author: Lewis John McGibbney <le...@jpl.nasa.gov>
Date:   2015-10-05T04:35:11Z

    GORA-240 Tests for MemStore

----


---
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] gora pull request: GORA-240 Tests for MemStore

Posted by lewismc <gi...@git.apache.org>.
Github user lewismc commented on the pull request:

    https://github.com/apache/gora/pull/45#issuecomment-145428704
  
    Current issues include the following.
    ```
    java.lang.NullPointerException
    	at org.apache.gora.store.impl.DataStoreBase.getFields(DataStoreBase.java:172)
    	at org.apache.gora.store.impl.DataStoreBase.getFieldsToQuery(DataStoreBase.java:168)
    	at org.apache.gora.memory.store.MemStore.execute(MemStore.java:148)
    	at org.apache.gora.query.impl.QueryBase.execute(QueryBase.java:73)
    	at org.apache.gora.store.DataStoreTestUtil.assertNumResults(DataStoreTestUtil.java:878)
    	at org.apache.gora.memory.store.MemStoreTest.testMemStoreDeleteByQueryFields(MemStoreTest.java:126)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:606)
    	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
    	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
    	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
    ```
    The issue here is that we attempt to execute DataStoreBase#getFields with the following logic
    ```
    List<Field> schemaFields = beanFactory.getCachedPersistent().getSchema().getFields();
    ```
    This throws NPE.
    Any ideas where we should ensure that this is prevented?


---
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] gora pull request: GORA-240 Tests for MemStore

Posted by renato2099 <gi...@git.apache.org>.
Github user renato2099 commented on the pull request:

    https://github.com/apache/gora/pull/45#issuecomment-145633581
  
    Hi @lewismc why don't we commit the fixes that you have made, and for the remaining issue we open a different JIRA issue and treat it separately? Because right now it is kind of difficult to spot where the breaking code is due to the changes. Wdyt?


---
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] gora pull request: GORA-240 Tests for MemStore

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

    https://github.com/apache/gora/pull/45


---
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.
---