You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Randall Hauch (JIRA)" <ji...@apache.org> on 2012/05/17 19:40:07 UTC

[jira] [Created] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

Randall Hauch created JCR-3313:
----------------------------------

             Summary: JCR TCK Test for expanding column names is too restrictive
                 Key: JCR-3313
                 URL: https://issues.apache.org/jira/browse/JCR-3313
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-jcr-tests, JCR 2.0
    Affects Versions: 2.4.1
            Reporter: Randall Hauch


The {{org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()}} test method issues the following query:

{code:sql}
SELECT s.* FROM [nt:unstructured] AS s
{code}

and then proceeds to check that the columns in the results set. However, there is at least one and possibly two issues with the expectations in the test.

Firstly, the test assumes that each column name include the selector alias (for example "{{s.jcr:primaryType}}"); this is not specified or required in the specification, and since only one selector is used, the column names technically do not need the selector.

Secondly (and more critically), the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section (emphasis mine):

{quote}
A {{Query}} consists of:
...
• A list of zero or more {{Column}}s to include in the tabular view of the query results. If no columns are specified, the columns available in the tabular view are implementation determined, but _*minimally include, for each selector, a column for each single-valued non-residual property of the selector's node type*_.
{quote}

In the test's query, no columns are specified for the selector '{{s}}', so the result set must to have _*at a minimum*_ columns for the since-valued non-residual property defined on the selector's node type, but an implementation _*can*_ include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).

The test's query uses "{{nt:unstructured}}" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the '{{jcr:mixinTypes}}' multi-valued property.

Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes _*at least*_ a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

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

Jukka Zitting updated JCR-3313:
-------------------------------

    Fix Version/s: 2.5.1

Typically the release version is set to the next trunk release version (in this case 2.5.1) when the issue is resolved. Alternatively the release manager will go through all resolved issues without a release version before the next release and update the issue metadata as needed.

I set the release version to 2.5.1 for now.
                
> JCR TCK Test for expanding column names is too restrictive
> ----------------------------------------------------------
>
>                 Key: JCR-3313
>                 URL: https://issues.apache.org/jira/browse/JCR-3313
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests, JCR 2.0
>    Affects Versions: 2.4.1
>            Reporter: Randall Hauch
>             Fix For: 2.5.1
>
>         Attachments: 0001-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch, 0002-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch
>
>
> The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:
>     SELECT s.* FROM [nt:unstructured] AS s
> and then proceeds to check that the columns in the results set. However, a problem with the expectations in the test: the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:
>     A Query consists of:
>     ...
>     • A list of zero or more Columns to include in the tabular view of the query results. 
>       If no columns are specified, the columns available in the tabular view are implementation 
>       determined, but minimally include, for each selector, a column for each single-valued 
>       non-residual property of the selector's node type.
> In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).
> The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.
> Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

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

Randall Hauch updated JCR-3313:
-------------------------------

    Attachment:     (was: 0001-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch)
    
> JCR TCK Test for expanding column names is too restrictive
> ----------------------------------------------------------
>
>                 Key: JCR-3313
>                 URL: https://issues.apache.org/jira/browse/JCR-3313
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests, JCR 2.0
>    Affects Versions: 2.4.1
>            Reporter: Randall Hauch
>         Attachments: 0001-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch
>
>
> The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:
>     SELECT s.* FROM [nt:unstructured] AS s
> and then proceeds to check that the columns in the results set. However, a problem with the expectations in the test: the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:
>     A Query consists of:
>     ...
>     • A list of zero or more Columns to include in the tabular view of the query results. 
>       If no columns are specified, the columns available in the tabular view are implementation 
>       determined, but minimally include, for each selector, a column for each single-valued 
>       non-residual property of the selector's node type.
> In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).
> The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.
> Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

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

Randall Hauch updated JCR-3313:
-------------------------------

    Status: Patch Available  (was: Open)

Please apply this patch for inclusion in 2.4.1 and the next 2.x release. Thanks.
                
> JCR TCK Test for expanding column names is too restrictive
> ----------------------------------------------------------
>
>                 Key: JCR-3313
>                 URL: https://issues.apache.org/jira/browse/JCR-3313
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests, JCR 2.0
>    Affects Versions: 2.4.1
>            Reporter: Randall Hauch
>         Attachments: 0001-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch
>
>
> The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:
>     SELECT s.* FROM [nt:unstructured] AS s
> and then proceeds to check that the columns in the results set. However, a problem with the expectations in the test: the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:
>     A Query consists of:
>     ...
>     • A list of zero or more Columns to include in the tabular view of the query results. 
>       If no columns are specified, the columns available in the tabular view are implementation 
>       determined, but minimally include, for each selector, a column for each single-valued 
>       non-residual property of the selector's node type.
> In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).
> The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.
> Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

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

Randall Hauch updated JCR-3313:
-------------------------------

    Attachment: 0001-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch

Attached a patch file that corrects the test case. (The changes are also available in this commit of my fork of Jackrabbit's Git repo: https://github.com/rhauch/jackrabbit/commit/6bd5a63a53f53627c47407c48125098bfe3ffea1 )

The ColumnTest.testExpandColumnsForNodeType() method was placing additional requirements: namely that the tabular view contains **only** a column for each single-valued non-residual property of the selector's node type.

This test was changed to more correctly enforce the specification's requirements by ensuring only that there is a column for each single-valued non-residual property of the selector's node type, while allowing other columns to exist. Note that this test is slightly less strict than before, so Jackrabbit Core passes this test without any changes.

Additionally, a full build with these changes succeeds as expected.
                
> JCR TCK Test for expanding column names is too restrictive
> ----------------------------------------------------------
>
>                 Key: JCR-3313
>                 URL: https://issues.apache.org/jira/browse/JCR-3313
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests, JCR 2.0
>    Affects Versions: 2.4.1
>            Reporter: Randall Hauch
>         Attachments: 0001-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch
>
>
> The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:
>     SELECT s.* FROM [nt:unstructured] AS s
> and then proceeds to check that the columns in the results set. However, a problem with the expectations in the test: the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:
>     A Query consists of:
>     ...
>     • A list of zero or more Columns to include in the tabular view of the query results. 
>       If no columns are specified, the columns available in the tabular view are implementation 
>       determined, but minimally include, for each selector, a column for each single-valued 
>       non-residual property of the selector's node type.
> In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).
> The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.
> Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

Posted by "Thomas Mueller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286519#comment-13286519 ] 

Thomas Mueller commented on JCR-3313:
-------------------------------------

(sorry I originally added this comment to the wrong issue)

In your patch, you have the following code within the loop:

+                        names.add(columnName);
+                        assertTrue("Missing column: " + columnName, names.remove(columnName));

This will add and then remove the column name, leaving "names" empty. I guess the second line is incorrect?

                
> JCR TCK Test for expanding column names is too restrictive
> ----------------------------------------------------------
>
>                 Key: JCR-3313
>                 URL: https://issues.apache.org/jira/browse/JCR-3313
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests, JCR 2.0
>    Affects Versions: 2.4.1
>            Reporter: Randall Hauch
>         Attachments: 0001-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch
>
>
> The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:
>     SELECT s.* FROM [nt:unstructured] AS s
> and then proceeds to check that the columns in the results set. However, a problem with the expectations in the test: the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:
>     A Query consists of:
>     ...
>     • A list of zero or more Columns to include in the tabular view of the query results. 
>       If no columns are specified, the columns available in the tabular view are implementation 
>       determined, but minimally include, for each selector, a column for each single-valued 
>       non-residual property of the selector's node type.
> In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).
> The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.
> Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

Posted by "Randall Hauch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286657#comment-13286657 ] 

Randall Hauch commented on JCR-3313:
------------------------------------

Thanks, Thomas!
                
> JCR TCK Test for expanding column names is too restrictive
> ----------------------------------------------------------
>
>                 Key: JCR-3313
>                 URL: https://issues.apache.org/jira/browse/JCR-3313
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests, JCR 2.0
>    Affects Versions: 2.4.1
>            Reporter: Randall Hauch
>         Attachments: 0001-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch, 0002-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch
>
>
> The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:
>     SELECT s.* FROM [nt:unstructured] AS s
> and then proceeds to check that the columns in the results set. However, a problem with the expectations in the test: the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:
>     A Query consists of:
>     ...
>     • A list of zero or more Columns to include in the tabular view of the query results. 
>       If no columns are specified, the columns available in the tabular view are implementation 
>       determined, but minimally include, for each selector, a column for each single-valued 
>       non-residual property of the selector's node type.
> In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).
> The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.
> Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

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

Randall Hauch updated JCR-3313:
-------------------------------

    Attachment: 0002-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch

Thanks for reviewing the patch and for catching that error, Thomas. The line with the assert and the embedded remove should not be in the first loop. I've attached an updated patch. Please let me know if you find any other issues.
                
> JCR TCK Test for expanding column names is too restrictive
> ----------------------------------------------------------
>
>                 Key: JCR-3313
>                 URL: https://issues.apache.org/jira/browse/JCR-3313
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests, JCR 2.0
>    Affects Versions: 2.4.1
>            Reporter: Randall Hauch
>         Attachments: 0001-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch, 0002-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch
>
>
> The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:
>     SELECT s.* FROM [nt:unstructured] AS s
> and then proceeds to check that the columns in the results set. However, a problem with the expectations in the test: the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:
>     A Query consists of:
>     ...
>     • A list of zero or more Columns to include in the tabular view of the query results. 
>       If no columns are specified, the columns available in the tabular view are implementation 
>       determined, but minimally include, for each selector, a column for each single-valued 
>       non-residual property of the selector's node type.
> In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).
> The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.
> Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

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

Randall Hauch updated JCR-3313:
-------------------------------

    Attachment: 0001-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch
    
> JCR TCK Test for expanding column names is too restrictive
> ----------------------------------------------------------
>
>                 Key: JCR-3313
>                 URL: https://issues.apache.org/jira/browse/JCR-3313
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests, JCR 2.0
>    Affects Versions: 2.4.1
>            Reporter: Randall Hauch
>         Attachments: 0001-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch
>
>
> The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:
>     SELECT s.* FROM [nt:unstructured] AS s
> and then proceeds to check that the columns in the results set. However, a problem with the expectations in the test: the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:
>     A Query consists of:
>     ...
>     • A list of zero or more Columns to include in the tabular view of the query results. 
>       If no columns are specified, the columns available in the tabular view are implementation 
>       determined, but minimally include, for each selector, a column for each single-valued 
>       non-residual property of the selector's node type.
> In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).
> The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.
> Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

Posted by "Randall Hauch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286069#comment-13286069 ] 

Randall Hauch commented on JCR-3313:
------------------------------------

Can a committer please review the patch, target to a release, and merge the code (if there are no issues with the patch)?
                
> JCR TCK Test for expanding column names is too restrictive
> ----------------------------------------------------------
>
>                 Key: JCR-3313
>                 URL: https://issues.apache.org/jira/browse/JCR-3313
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests, JCR 2.0
>    Affects Versions: 2.4.1
>            Reporter: Randall Hauch
>         Attachments: 0001-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch
>
>
> The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:
>     SELECT s.* FROM [nt:unstructured] AS s
> and then proceeds to check that the columns in the results set. However, a problem with the expectations in the test: the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:
>     A Query consists of:
>     ...
>     • A list of zero or more Columns to include in the tabular view of the query results. 
>       If no columns are specified, the columns available in the tabular view are implementation 
>       determined, but minimally include, for each selector, a column for each single-valued 
>       non-residual property of the selector's node type.
> In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).
> The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.
> Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

Posted by "Randall Hauch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286664#comment-13286664 ] 

Randall Hauch commented on JCR-3313:
------------------------------------

There's no fix version. (Sorry, not sure if Jackrabbit's policy is that the reporter should set it; I neglected to.) Will this go into 2.6, or perhaps also in 2.5.1?
                
> JCR TCK Test for expanding column names is too restrictive
> ----------------------------------------------------------
>
>                 Key: JCR-3313
>                 URL: https://issues.apache.org/jira/browse/JCR-3313
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests, JCR 2.0
>    Affects Versions: 2.4.1
>            Reporter: Randall Hauch
>         Attachments: 0001-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch, 0002-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch
>
>
> The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:
>     SELECT s.* FROM [nt:unstructured] AS s
> and then proceeds to check that the columns in the results set. However, a problem with the expectations in the test: the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:
>     A Query consists of:
>     ...
>     • A list of zero or more Columns to include in the tabular view of the query results. 
>       If no columns are specified, the columns available in the tabular view are implementation 
>       determined, but minimally include, for each selector, a column for each single-valued 
>       non-residual property of the selector's node type.
> In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).
> The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.
> Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

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

Randall Hauch updated JCR-3313:
-------------------------------

    Attachment:     (was: 0001-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch)
    
> JCR TCK Test for expanding column names is too restrictive
> ----------------------------------------------------------
>
>                 Key: JCR-3313
>                 URL: https://issues.apache.org/jira/browse/JCR-3313
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests, JCR 2.0
>    Affects Versions: 2.4.1
>            Reporter: Randall Hauch
>
> The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:
>     SELECT s.* FROM [nt:unstructured] AS s
> and then proceeds to check that the columns in the results set. However, a problem with the expectations in the test: the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:
>     A Query consists of:
>     ...
>     • A list of zero or more Columns to include in the tabular view of the query results. 
>       If no columns are specified, the columns available in the tabular view are implementation 
>       determined, but minimally include, for each selector, a column for each single-valued 
>       non-residual property of the selector's node type.
> In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).
> The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.
> Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

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

Randall Hauch updated JCR-3313:
-------------------------------

    Description: 
The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:

    SELECT s.* FROM [nt:unstructured] AS s

and then proceeds to check that the columns in the results set. However, a problem with the expectations in the test: the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:

    A Query consists of:
    ...
    • A list of zero or more Columns to include in the tabular view of the query results. 
      If no columns are specified, the columns available in the tabular view are implementation 
      determined, but minimally include, for each selector, a column for each single-valued 
      non-residual property of the selector's node type.

In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).

The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.

Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

  was:
The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:

    SELECT s.* FROM [nt:unstructured] AS s

and then proceeds to check that the columns in the results set. However, there is at least one and possibly two issues with the expectations in the test.

Firstly, the test assumes that each column name include the selector alias (for example "s.jcr:primaryType"); this is not specified or required in the specification, and since only one selector is used, the column names technically do not need the selector.

Secondly (and more critically), the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:

    A {{Query}} consists of:
    ...
    • A list of zero or more {{Column}}s to include in the tabular view of the query results. 
      If no columns are specified, the columns available in the tabular view are implementation 
      determined, but minimally include, for each selector, a column for each single-valued 
      non-residual property of the selector's node type.

In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).

The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.

Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

    
> JCR TCK Test for expanding column names is too restrictive
> ----------------------------------------------------------
>
>                 Key: JCR-3313
>                 URL: https://issues.apache.org/jira/browse/JCR-3313
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests, JCR 2.0
>    Affects Versions: 2.4.1
>            Reporter: Randall Hauch
>
> The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:
>     SELECT s.* FROM [nt:unstructured] AS s
> and then proceeds to check that the columns in the results set. However, a problem with the expectations in the test: the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:
>     A Query consists of:
>     ...
>     • A list of zero or more Columns to include in the tabular view of the query results. 
>       If no columns are specified, the columns available in the tabular view are implementation 
>       determined, but minimally include, for each selector, a column for each single-valued 
>       non-residual property of the selector's node type.
> In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).
> The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.
> Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

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

Randall Hauch updated JCR-3313:
-------------------------------

    Attachment: 0001-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch

Replaced patch file with a better/simpler one.
                
> JCR TCK Test for expanding column names is too restrictive
> ----------------------------------------------------------
>
>                 Key: JCR-3313
>                 URL: https://issues.apache.org/jira/browse/JCR-3313
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests, JCR 2.0
>    Affects Versions: 2.4.1
>            Reporter: Randall Hauch
>         Attachments: 0001-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch
>
>
> The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:
>     SELECT s.* FROM [nt:unstructured] AS s
> and then proceeds to check that the columns in the results set. However, a problem with the expectations in the test: the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:
>     A Query consists of:
>     ...
>     • A list of zero or more Columns to include in the tabular view of the query results. 
>       If no columns are specified, the columns available in the tabular view are implementation 
>       determined, but minimally include, for each selector, a column for each single-valued 
>       non-residual property of the selector's node type.
> In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).
> The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.
> Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

Posted by "Thomas Mueller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286655#comment-13286655 ] 

Thomas Mueller commented on JCR-3313:
-------------------------------------

Hi Randall,

The code looks good to me, and it matches the specification as far as I can see. I will commit it.

Regards,
Thomas
                
> JCR TCK Test for expanding column names is too restrictive
> ----------------------------------------------------------
>
>                 Key: JCR-3313
>                 URL: https://issues.apache.org/jira/browse/JCR-3313
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests, JCR 2.0
>    Affects Versions: 2.4.1
>            Reporter: Randall Hauch
>         Attachments: 0001-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch, 0002-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch
>
>
> The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:
>     SELECT s.* FROM [nt:unstructured] AS s
> and then proceeds to check that the columns in the results set. However, a problem with the expectations in the test: the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:
>     A Query consists of:
>     ...
>     • A list of zero or more Columns to include in the tabular view of the query results. 
>       If no columns are specified, the columns available in the tabular view are implementation 
>       determined, but minimally include, for each selector, a column for each single-valued 
>       non-residual property of the selector's node type.
> In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).
> The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.
> Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

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

Thomas Mueller updated JCR-3313:
--------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Thanks a lot for the patch!
                
> JCR TCK Test for expanding column names is too restrictive
> ----------------------------------------------------------
>
>                 Key: JCR-3313
>                 URL: https://issues.apache.org/jira/browse/JCR-3313
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests, JCR 2.0
>    Affects Versions: 2.4.1
>            Reporter: Randall Hauch
>         Attachments: 0001-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch, 0002-JCR-3313-Changed-a-ColumnTest-test-to-only-check-for.patch
>
>
> The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:
>     SELECT s.* FROM [nt:unstructured] AS s
> and then proceeds to check that the columns in the results set. However, a problem with the expectations in the test: the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:
>     A Query consists of:
>     ...
>     • A list of zero or more Columns to include in the tabular view of the query results. 
>       If no columns are specified, the columns available in the tabular view are implementation 
>       determined, but minimally include, for each selector, a column for each single-valued 
>       non-residual property of the selector's node type.
> In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).
> The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.
> Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Comment Edited] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

Posted by "Randall Hauch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13282798#comment-13282798 ] 

Randall Hauch edited comment on JCR-3313 at 5/24/12 10:00 PM:
--------------------------------------------------------------

Attached a patch file that corrects the test case. (The changes are also available in this commit of my fork of Jackrabbit's Git repo: https://github.com/rhauch/jackrabbit/commit/00b3528aed74693df2b6745fe4d18dc1e74eb37d )

The ColumnTest.testExpandColumnsForNodeType() method was placing additional requirements: namely that the tabular view contains **only** a column for each single-valued non-residual property of the selector's node type.

This test was changed to more correctly enforce the specification's requirements by ensuring only that there is a column for each single-valued non-residual property of the selector's node type, while allowing other columns to exist. Note that this test is slightly less strict than before, so Jackrabbit Core passes this test without any changes.

Additionally, a full build with these changes succeeds as expected.
                
      was (Author: rhauch):
    Attached a patch file that corrects the test case. (The changes are also available in this commit of my fork of Jackrabbit's Git repo: https://github.com/rhauch/jackrabbit/commit/6bd5a63a53f53627c47407c48125098bfe3ffea1 )

The ColumnTest.testExpandColumnsForNodeType() method was placing additional requirements: namely that the tabular view contains **only** a column for each single-valued non-residual property of the selector's node type.

This test was changed to more correctly enforce the specification's requirements by ensuring only that there is a column for each single-valued non-residual property of the selector's node type, while allowing other columns to exist. Note that this test is slightly less strict than before, so Jackrabbit Core passes this test without any changes.

Additionally, a full build with these changes succeeds as expected.
                  
> JCR TCK Test for expanding column names is too restrictive
> ----------------------------------------------------------
>
>                 Key: JCR-3313
>                 URL: https://issues.apache.org/jira/browse/JCR-3313
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests, JCR 2.0
>    Affects Versions: 2.4.1
>            Reporter: Randall Hauch
>
> The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:
>     SELECT s.* FROM [nt:unstructured] AS s
> and then proceeds to check that the columns in the results set. However, a problem with the expectations in the test: the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:
>     A Query consists of:
>     ...
>     • A list of zero or more Columns to include in the tabular view of the query results. 
>       If no columns are specified, the columns available in the tabular view are implementation 
>       determined, but minimally include, for each selector, a column for each single-valued 
>       non-residual property of the selector's node type.
> In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).
> The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.
> Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

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

Randall Hauch updated JCR-3313:
-------------------------------

    Description: 
The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:

    SELECT s.* FROM [nt:unstructured] AS s

and then proceeds to check that the columns in the results set. However, there is at least one and possibly two issues with the expectations in the test.

Firstly, the test assumes that each column name include the selector alias (for example "s.jcr:primaryType"); this is not specified or required in the specification, and since only one selector is used, the column names technically do not need the selector.

Secondly (and more critically), the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:

    A {{Query}} consists of:
    ...
    • A list of zero or more {{Column}}s to include in the tabular view of the query results. 
      If no columns are specified, the columns available in the tabular view are implementation 
      determined, but minimally include, for each selector, a column for each single-valued 
      non-residual property of the selector's node type.

In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).

The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.

Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

  was:
The {{org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()}} test method issues the following query:

    SELECT s.* FROM [nt:unstructured] AS s

and then proceeds to check that the columns in the results set. However, there is at least one and possibly two issues with the expectations in the test.

Firstly, the test assumes that each column name include the selector alias (for example "s.jcr:primaryType"); this is not specified or required in the specification, and since only one selector is used, the column names technically do not need the selector.

Secondly (and more critically), the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:

    A {{Query}} consists of:
    ...
    • A list of zero or more {{Column}}s to include in the tabular view of the query results. 
      If no columns are specified, the columns available in the tabular view are implementation 
      determined, but minimally include, for each selector, a column for each single-valued 
      non-residual property of the selector's node type.

In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).

The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.

Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

    
> JCR TCK Test for expanding column names is too restrictive
> ----------------------------------------------------------
>
>                 Key: JCR-3313
>                 URL: https://issues.apache.org/jira/browse/JCR-3313
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests, JCR 2.0
>    Affects Versions: 2.4.1
>            Reporter: Randall Hauch
>
> The 'org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()' test method issues the following query:
>     SELECT s.* FROM [nt:unstructured] AS s
> and then proceeds to check that the columns in the results set. However, there is at least one and possibly two issues with the expectations in the test.
> Firstly, the test assumes that each column name include the selector alias (for example "s.jcr:primaryType"); this is not specified or required in the specification, and since only one selector is used, the column names technically do not need the selector.
> Secondly (and more critically), the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:
>     A {{Query}} consists of:
>     ...
>     • A list of zero or more {{Column}}s to include in the tabular view of the query results. 
>       If no columns are specified, the columns available in the tabular view are implementation 
>       determined, but minimally include, for each selector, a column for each single-valued 
>       non-residual property of the selector's node type.
> In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).
> The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.
> Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (JCR-3313) JCR TCK Test for expanding column names is too restrictive

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

Randall Hauch updated JCR-3313:
-------------------------------

    Description: 
The {{org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()}} test method issues the following query:

    SELECT s.* FROM [nt:unstructured] AS s

and then proceeds to check that the columns in the results set. However, there is at least one and possibly two issues with the expectations in the test.

Firstly, the test assumes that each column name include the selector alias (for example "s.jcr:primaryType"); this is not specified or required in the specification, and since only one selector is used, the column names technically do not need the selector.

Secondly (and more critically), the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:

    A {{Query}} consists of:
    ...
    • A list of zero or more {{Column}}s to include in the tabular view of the query results. 
      If no columns are specified, the columns available in the tabular view are implementation 
      determined, but minimally include, for each selector, a column for each single-valued 
      non-residual property of the selector's node type.

In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).

The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.

Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

  was:
The {{org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()}} test method issues the following query:

{code:sql}
SELECT s.* FROM [nt:unstructured] AS s
{code}

and then proceeds to check that the columns in the results set. However, there is at least one and possibly two issues with the expectations in the test.

Firstly, the test assumes that each column name include the selector alias (for example "{{s.jcr:primaryType}}"); this is not specified or required in the specification, and since only one selector is used, the column names technically do not need the selector.

Secondly (and more critically), the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section (emphasis mine):

{quote}
A {{Query}} consists of:
...
• A list of zero or more {{Column}}s to include in the tabular view of the query results. If no columns are specified, the columns available in the tabular view are implementation determined, but _*minimally include, for each selector, a column for each single-valued non-residual property of the selector's node type*_.
{quote}

In the test's query, no columns are specified for the selector '{{s}}', so the result set must to have _*at a minimum*_ columns for the since-valued non-residual property defined on the selector's node type, but an implementation _*can*_ include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).

The test's query uses "{{nt:unstructured}}" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the '{{jcr:mixinTypes}}' multi-valued property.

Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes _*at least*_ a column for each single-valued non-residual property on the selector's node type.

    
> JCR TCK Test for expanding column names is too restrictive
> ----------------------------------------------------------
>
>                 Key: JCR-3313
>                 URL: https://issues.apache.org/jira/browse/JCR-3313
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests, JCR 2.0
>    Affects Versions: 2.4.1
>            Reporter: Randall Hauch
>
> The {{org.apache.jackrabbit.test.api.query.qom.ColumnTest.testExpandColumnsForNodeType()}} test method issues the following query:
>     SELECT s.* FROM [nt:unstructured] AS s
> and then proceeds to check that the columns in the results set. However, there is at least one and possibly two issues with the expectations in the test.
> Firstly, the test assumes that each column name include the selector alias (for example "s.jcr:primaryType"); this is not specified or required in the specification, and since only one selector is used, the column names technically do not need the selector.
> Secondly (and more critically), the test assumes that the result set *only* contains columns for the single-valued, non-residual property definitions for the selected node type. Clearly this is overly constraining, since Section 6.7.1 of the JSR-283 specification clearly allows an implementation to return additional columns (e.g., multi-valued property definitions). Here's the relevant parts of this section:
>     A {{Query}} consists of:
>     ...
>     • A list of zero or more {{Column}}s to include in the tabular view of the query results. 
>       If no columns are specified, the columns available in the tabular view are implementation 
>       determined, but minimally include, for each selector, a column for each single-valued 
>       non-residual property of the selector's node type.
> In the test's query, no columns are specified for the selector 's', so the result set must to have AT A MINIMUM  the columns for the single-valued non-residual property defined on the selector's node type, but an implementation CAN include columns for other properties defined on the selector's node type. An implementation is even allowed to include columns that do not map to properties defined on the selector's node type (e.g., pseudo-columns that don't really exist as properties).
> The test's query uses "nt:unstructured" for the test node type (if not overridden by the test environment), and in this case an implementation should be allowed to include the 'jcr:mixinTypes' multi-valued property.
> Therefore, the test is overly strict and should not fail when extra columns are included. The correct behavior is to test only that the result includes AT LEAST a column for each single-valued non-residual property on the selector's node type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira