You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Henry Robinson (JIRA)" <ji...@apache.org> on 2009/11/13 00:26:39 UTC

[jira] Created: (ZOOKEEPER-579) zkpython needs more test coverage for ACL code paths

zkpython needs more test coverage for ACL code paths
----------------------------------------------------

                 Key: ZOOKEEPER-579
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-579
             Project: Zookeeper
          Issue Type: Improvement
          Components: contrib-bindings
    Affects Versions: 3.2.1
            Reporter: Henry Robinson
            Assignee: Henry Robinson


zkpython's tests don't do a good enough job of exercising the ACL code paths. A few new tests that confirm that setACL and friends are working correctly are needed. 



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-579) zkpython needs more test coverage for ACL code paths

Posted by "Henry Robinson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831217#action_12831217 ] 

Henry Robinson commented on ZOOKEEPER-579:
------------------------------------------

It is a problem that the build is considered successful even though tests fail... I should make a new JIRA to fix that.

What version of Python are you using? Both of those tests pass fine for me on Python 2.6, but it's possible that this is a version-related error. 


> zkpython needs more test coverage for ACL code paths
> ----------------------------------------------------
>
>                 Key: ZOOKEEPER-579
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-579
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 3.3.0
>
>         Attachments: zookeeper-579.patch
>
>
> zkpython's tests don't do a good enough job of exercising the ACL code paths. A few new tests that confirm that setACL and friends are working correctly are needed. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-579) zkpython needs more test coverage for ACL code paths

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831214#action_12831214 ] 

Mahadev konar commented on ZOOKEEPER-579:
-----------------------------------------

I get this while running ant test in src/contrib/zkpython:

{noformat}
     [exec] ======================================================================
     [exec] ERROR: test_multiple_watchers (__main__.CallbackTest)
     [exec] ----------------------------------------------------------------------
     [exec] Traceback (most recent call last):
     [exec]   File "src/test/callback_test.py", line 130, in test_multiple_watchers
     [exec]     self.assertTrue(self.watcher1 and self.watcher2, "One or more watchers failed to fire")
     [exec] AttributeError: 'CallbackTest' object has no attribute 'assertTrue'
     [exec] 
     [exec] ----------------------------------------------------------------------
     [exec] Ran 4 tests in 0.167s
     [exec] 
     [exec] FAILED (errors=1)
     [exec] Running src/test/clientid_test.py
     [exec] .
     [exec] ----------------------------------------------------------------------
     [exec] Ran 1 test in 0.011s
     [exec] 
     [exec] OK
     [exec] Running src/test/connection_test.py
     [exec]   File "src/test/connection_test.py", line 118
     [exec]     self.assertEqual(True, all( zookeeper.close(h) == zookeeper.OK for h in handles ))
     [exec]                                                                      ^
     [exec] SyntaxError: invalid syntax
     [exec] Running src/test/create_test.py
     [exec] ....
     [exec] ----------------------------------------------------------------------
     [exec] Ran 4 tests in 0.072s
     [exec] 
     [exec] OK
     [exec] Running src/test/delete_test.py
     [exec] ..
     [exec] ----------------------------------------------------------------------
     [exec] Ran 2 tests in 0.046s
     [exec] 
     [exec] OK
     [exec] Running src/test/exists_test.py
     [exec] ...
     [exec] ----------------------------------------------------------------------
     [exec] Ran 3 tests in 0.062s
     [exec] 
     [exec] OK
     [exec] Running src/test/get_set_test.py
     [exec] ......
     [exec] ----------------------------------------------------------------------
     [exec] Ran 6 tests in 4.812s
     [exec] 
     [exec] OK

test-stop:

test:

BUILD SUCCESSFUL
Total time: 13 seconds
{noformat}

I see some errors in the output which look a little suspicious, though ant declares a successful build. Am I missing something?


> zkpython needs more test coverage for ACL code paths
> ----------------------------------------------------
>
>                 Key: ZOOKEEPER-579
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-579
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 3.3.0
>
>         Attachments: zookeeper-579.patch
>
>
> zkpython's tests don't do a good enough job of exercising the ACL code paths. A few new tests that confirm that setACL and friends are working correctly are needed. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-579) zkpython needs more test coverage for ACL code paths

Posted by "Henry Robinson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henry Robinson updated ZOOKEEPER-579:
-------------------------------------

    Attachment: zookeeper-579.patch

Patch adds test for aget_acl, aset_acl, set_acl and get_acl. 

Also adds tests in the C code for ACL objects that are roughly correctly formed, throwing InvalidACL where they are not found. This is to prevent an unpleasant bug where passing another object, say a callable, could silently succeed until a strange error condition would present. 

> zkpython needs more test coverage for ACL code paths
> ----------------------------------------------------
>
>                 Key: ZOOKEEPER-579
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-579
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>         Attachments: zookeeper-579.patch
>
>
> zkpython's tests don't do a good enough job of exercising the ACL code paths. A few new tests that confirm that setACL and friends are working correctly are needed. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-579) zkpython needs more test coverage for ACL code paths

Posted by "Henry Robinson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henry Robinson updated ZOOKEEPER-579:
-------------------------------------

    Status: Patch Available  (was: Open)

> zkpython needs more test coverage for ACL code paths
> ----------------------------------------------------
>
>                 Key: ZOOKEEPER-579
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-579
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>         Attachments: zookeeper-579.patch
>
>
> zkpython's tests don't do a good enough job of exercising the ACL code paths. A few new tests that confirm that setACL and friends are working correctly are needed. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-579) zkpython needs more test coverage for ACL code paths

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831206#action_12831206 ] 

Mahadev konar commented on ZOOKEEPER-579:
-----------------------------------------

+1 the patch looks good. ll run zkpython tests and post the results here.

henry, you might want to start adding comments to the zookeeper.c file so that its easier for other developers to work on it in case someone wants to pick it up. 



> zkpython needs more test coverage for ACL code paths
> ----------------------------------------------------
>
>                 Key: ZOOKEEPER-579
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-579
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>         Attachments: zookeeper-579.patch
>
>
> zkpython's tests don't do a good enough job of exercising the ACL code paths. A few new tests that confirm that setACL and friends are working correctly are needed. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-579) zkpython needs more test coverage for ACL code paths

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-579:
------------------------------------

    Fix Version/s: 3.3.0

marking it for 3.3

> zkpython needs more test coverage for ACL code paths
> ----------------------------------------------------
>
>                 Key: ZOOKEEPER-579
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-579
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 3.3.0
>
>         Attachments: zookeeper-579.patch
>
>
> zkpython's tests don't do a good enough job of exercising the ACL code paths. A few new tests that confirm that setACL and friends are working correctly are needed. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-579) zkpython needs more test coverage for ACL code paths

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841472#action_12841472 ] 

Patrick Hunt commented on ZOOKEEPER-579:
----------------------------------------

Mahadev can you take a look at this, are you still experiencing issues in test(s)?

> zkpython needs more test coverage for ACL code paths
> ----------------------------------------------------
>
>                 Key: ZOOKEEPER-579
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-579
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 3.3.0
>
>         Attachments: zookeeper-579.patch
>
>
> zkpython's tests don't do a good enough job of exercising the ACL code paths. A few new tests that confirm that setACL and friends are working correctly are needed. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-579) zkpython needs more test coverage for ACL code paths

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-579:
------------------------------------

    Attachment:     (was: zookeeper-579.patch)

> zkpython needs more test coverage for ACL code paths
> ----------------------------------------------------
>
>                 Key: ZOOKEEPER-579
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-579
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 3.3.0
>
>         Attachments: zookeeper-579.patch, zookeeper-579.patch
>
>
> zkpython's tests don't do a good enough job of exercising the ACL code paths. A few new tests that confirm that setACL and friends are working correctly are needed. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-579) zkpython needs more test coverage for ACL code paths

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-579:
------------------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

I just committed this. thanks henry!

> zkpython needs more test coverage for ACL code paths
> ----------------------------------------------------
>
>                 Key: ZOOKEEPER-579
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-579
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 3.3.0
>
>         Attachments: zookeeper-579.patch, zookeeper-579.patch
>
>
> zkpython's tests don't do a good enough job of exercising the ACL code paths. A few new tests that confirm that setACL and friends are working correctly are needed. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-579) zkpython needs more test coverage for ACL code paths

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-579:
------------------------------------

    Attachment: zookeeper-579.patch

forgot to attach a new file.

> zkpython needs more test coverage for ACL code paths
> ----------------------------------------------------
>
>                 Key: ZOOKEEPER-579
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-579
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 3.3.0
>
>         Attachments: zookeeper-579.patch, zookeeper-579.patch
>
>
> zkpython's tests don't do a good enough job of exercising the ACL code paths. A few new tests that confirm that setACL and friends are working correctly are needed. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-579) zkpython needs more test coverage for ACL code paths

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836070#action_12836070 ] 

Hadoop QA commented on ZOOKEEPER-579:
-------------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12434938/zookeeper-579.patch
  against trunk revision 911716.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 2 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h7.grid.sp2.yahoo.net/66/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h7.grid.sp2.yahoo.net/66/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h7.grid.sp2.yahoo.net/66/console

This message is automatically generated.

> zkpython needs more test coverage for ACL code paths
> ----------------------------------------------------
>
>                 Key: ZOOKEEPER-579
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-579
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 3.3.0
>
>         Attachments: zookeeper-579.patch
>
>
> zkpython's tests don't do a good enough job of exercising the ACL code paths. A few new tests that confirm that setACL and friends are working correctly are needed. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-579) zkpython needs more test coverage for ACL code paths

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841812#action_12841812 ] 

Hudson commented on ZOOKEEPER-579:
----------------------------------

Integrated in ZooKeeper-trunk #715 (See [http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/715/])
    . zkpython needs more test coverage for ACL code paths (henry via mahadev)


> zkpython needs more test coverage for ACL code paths
> ----------------------------------------------------
>
>                 Key: ZOOKEEPER-579
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-579
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 3.3.0
>
>         Attachments: zookeeper-579.patch, zookeeper-579.patch
>
>
> zkpython's tests don't do a good enough job of exercising the ACL code paths. A few new tests that confirm that setACL and friends are working correctly are needed. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-579) zkpython needs more test coverage for ACL code paths

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-579:
------------------------------------

    Attachment: zookeeper-579.patch

i tried the patch. It works against 2.6 fine. So, I changed the README to reflect that we have just tested against 2.6 and greater (excluding 3.*). 

Earlier it said that it works against >= 2.3. Other than that the patch looks good. I will go ahead and commit it.

> zkpython needs more test coverage for ACL code paths
> ----------------------------------------------------
>
>                 Key: ZOOKEEPER-579
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-579
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 3.3.0
>
>         Attachments: zookeeper-579.patch, zookeeper-579.patch
>
>
> zkpython's tests don't do a good enough job of exercising the ACL code paths. A few new tests that confirm that setACL and friends are working correctly are needed. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.