You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2014/08/27 11:16:58 UTC

[jira] [Updated] (DERBY-6716) Minor fixes in SystemPrivilegesPermissionTest

     [ https://issues.apache.org/jira/browse/DERBY-6716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-6716:
--------------------------------------

    Attachment: d6716-1a.diff

The patch [^d6716-1a.diff] makes the following changes to SystemPrivilegesPermissionTest:

- check both "p1 implies p2" and "p2 implies p1" in assertEquivalentPermissions(), instead of checking "p1 implies p2" twice.
- remove a stray if statement that disables an assert in situations where it's expected to succeed.


> Minor fixes in SystemPrivilegesPermissionTest
> ---------------------------------------------
>
>                 Key: DERBY-6716
>                 URL: https://issues.apache.org/jira/browse/DERBY-6716
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.12.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Trivial
>             Fix For: 10.12.0.0
>
>         Attachments: d6716-1a.diff
>
>
> I noticed two typos in SystemPrivilegesPermissionTest that reduces the test coverage ever so slightly.
> 1) assertEquivalentPermissions() checks if two permissions, p1 and p2, are equal. One of the checks is supposed to be that p1 implies p2 and p2 implies p1. Instead of checking that both holds, it checks that p1 implies p2 twice.
> 2) testSystemPermission() does some work to reorder expected actions to match the canonical action order before calling assertEquals(). However, assertEquals() is only called if the actions didn't have to be reordered. The assert could have been called unconditionally.



--
This message was sent by Atlassian JIRA
(v6.2#6252)