db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew McIntyre (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-2410) Convert grantRevoke.java to JUnit
Date Tue, 20 Mar 2007 07:28:32 GMT

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

Andrew McIntyre updated DERBY-2410:
-----------------------------------

    Attachment: derby-2410-pre5.diff

This will be the last of my 'pre' patches for this issue. I've converted all of the testcases
in grantRevoke.java, but there remain several issues to resolve / doc:

- DatabaseMetaData methods seem to currently require uppercase schema / table names. This
seems to be expected behavior based on my reading of the code and metadata queries, although
I could not find any documentation for it.
- privileges granted by the database owner in an open transaction block user transactions
for the same column/table because grant/revoke statements are always executed with repeatable
read isolation level. Again, I believe this is expected behavior from reading the code, but
could not find any documentation for it.
- one testcase checking update privilege on all columns of a table for a user fails to get
table privilege for that user using DatabaseMetaData.getTablePrivileges(), worth investigating.
- one testcase checking insert privilege cannot be verified via DatabaseMetaData for all columns
of a table after rollback of a transaction including grant/revoke statements, needs further
investigation.
- need check for REFERENCES privilege missing from previous version of the test
- trigger privilege is asserted by creating the trigger with autoCommit(false) and then rolling
the transaction back, but attempting to assert that the trigger privilege has been granted
by checking the DatabaseMetaData, while the transaction being used to create the trigger to
assert the privilege is active, causes a lock timeout. Probably related to grant / revoke
statements always being executed with isolation level RR.
- checking DatabaseMetaData.getColumnPrivileges() for every column in a table, when attempting
to assert that we have permission on every column in that table fails. I highly suspect that
my logic in checking the permissions is incorrect and would really like another set of eyes
here. See the comments in the test for assertPrivilegeMetaData().

I still have several tests I plan to run to check the behavior of the previous grantRevoke.java
test against my conversion, but because it is not a junit test, it is slow going. Assuming
there is no feedback on the issues above, I will commit the attached test in a few days and
remove the old grantRevoke.java.

Once / If the above are resolved / committed, I plan to convert additional testcases from
grantRevokeDDL.sql and grantRevokeDDL2.sql to complete this issue.

> Convert grantRevoke.java to JUnit
> ---------------------------------
>
>                 Key: DERBY-2410
>                 URL: https://issues.apache.org/jira/browse/DERBY-2410
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.3.0.0
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>             Fix For: 10.3.0.0
>
>         Attachments: derby-2410-pre.diff, derby-2410-pre2.diff, derby-2410-pre3.diff,
derby-2410-pre4.diff, derby-2410-pre5.diff
>
>
> Convert grantRevoke.java to JUnit. Also add test cases from grantRevokeDDL and grantRevokeDDL2
SQL tests to the new GrantRevokeTest

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


Mime
View raw message