[JBoss JIRA] (TEIID-2808) Oversights in parser test unit tests
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2808?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-2808:
---------------------------------------
Applied the patch with additional changes. We cannot yet without additional engine changes do the type check in element symbol as we need to abuse the type system occasional - such as with the exception type since it's not a proper type.
I'll leave this open for now.
> Oversights in parser test unit tests
> ------------------------------------
>
> Key: TEIID-2808
> URL: https://issues.jboss.org/browse/TEIID-2808
> Project: Teiid
> Issue Type: Bug
> Components: Integration Tests
> Affects Versions: 8.4, 8.6
> Reporter: Paul Richardson
> Assignee: Steven Hawkins
> Priority: Minor
> Attachments: 0001-TEIID-2808-Small-fixes-to-unit-tests-and-accompanyin.patch
>
>
> While integrating the unit tests from TestParser into Designer's teiid runtime client codebase, I found several small issues with the tests. All the tests pass in TestParser under Teiid hence these items have not necessarily been noticed and its a question of whether they should be.
> * testArrayTable
> ** The Constant node class' equals method does not test the 'type' field if the 'value' field is null. This allows the test to pass when the constants in the expected and actual Commands trees have different types. Discussion with [~rareddy] concluded the equals method does this by design.
> ** Suggestion is change the expected Constant to have NullType as its 'type' rather than Object.
> * testBlockExceptionHandling
> ** The Block node class has no equals method hence this test passes even though the 'groupExpression' field is different between expected and actual.
> * testDynamicCommand1
> ** The ElementSymbol node class never considers its 'type' field in its equals method hence the test passes despite an expected type of Integer against an actual type of null.
> ** test has a typo when the expected var 'a1' has its type set twice to String then Integer.
> * testStoredQuery2SanityCheck
> ** Has an extraneous query created and never used
> * testStoredQuerySubqueryMultipleParens
> ** Never executes due to a lack of @Test annotation. Judging by the comment it might be an experiment that has been commented out by removing the annotation. Reinforced by test failing with parsing exception.
> * testStoredQueryWithNoParameter2
> ** The test passes but has different expected and actual GroupSymbols in the From clause since the 'shortname' field is actually "x" rather than the expected "X". The reason is that GroupSymbol equals method does not test the 'shortname' field if the schema is null. This maybe by design?
> ** Suggestion is to at least change the expected value to "X".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (TEIID-2808) Oversights in parser test unit tests
by Paul Richardson (JIRA)
[ https://issues.jboss.org/browse/TEIID-2808?page=com.atlassian.jira.plugin... ]
Paul Richardson updated TEIID-2808:
-----------------------------------
Attachment: 0001-TEIID-2808-Small-fixes-to-unit-tests-and-accompanyin.patch
[~shawkins]
Attaching patch taking into account your comments. This is a git commit against 8.6.Final but I would imagine it will apply against whichever branch you're currently working off. Certainly, patch should take care of it.
> Oversights in parser test unit tests
> ------------------------------------
>
> Key: TEIID-2808
> URL: https://issues.jboss.org/browse/TEIID-2808
> Project: Teiid
> Issue Type: Bug
> Components: Integration Tests
> Affects Versions: 8.4, 8.6
> Reporter: Paul Richardson
> Assignee: Steven Hawkins
> Priority: Minor
> Attachments: 0001-TEIID-2808-Small-fixes-to-unit-tests-and-accompanyin.patch
>
>
> While integrating the unit tests from TestParser into Designer's teiid runtime client codebase, I found several small issues with the tests. All the tests pass in TestParser under Teiid hence these items have not necessarily been noticed and its a question of whether they should be.
> * testArrayTable
> ** The Constant node class' equals method does not test the 'type' field if the 'value' field is null. This allows the test to pass when the constants in the expected and actual Commands trees have different types. Discussion with [~rareddy] concluded the equals method does this by design.
> ** Suggestion is change the expected Constant to have NullType as its 'type' rather than Object.
> * testBlockExceptionHandling
> ** The Block node class has no equals method hence this test passes even though the 'groupExpression' field is different between expected and actual.
> * testDynamicCommand1
> ** The ElementSymbol node class never considers its 'type' field in its equals method hence the test passes despite an expected type of Integer against an actual type of null.
> ** test has a typo when the expected var 'a1' has its type set twice to String then Integer.
> * testStoredQuery2SanityCheck
> ** Has an extraneous query created and never used
> * testStoredQuerySubqueryMultipleParens
> ** Never executes due to a lack of @Test annotation. Judging by the comment it might be an experiment that has been commented out by removing the annotation. Reinforced by test failing with parsing exception.
> * testStoredQueryWithNoParameter2
> ** The test passes but has different expected and actual GroupSymbols in the From clause since the 'shortname' field is actually "x" rather than the expected "X". The reason is that GroupSymbol equals method does not test the 'shortname' field if the schema is null. This maybe by design?
> ** Suggestion is to at least change the expected value to "X".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (TEIID-2808) Oversights in parser test unit tests
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2808?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-2808:
---------------------------------------
I would suggest just submitting a patch for all this as it will be even more clear what you mean.
> Suggestion is change the expected Constant to have NullType as its 'type' rather than Object.
There is a case to be made either way. I'm fine with how it is currently or by looking at the type in addition to value object.
> The Block node class has no equals method hence this test passes even though the 'groupExpression' field is different between expected and actual.
Block does have an equality method. Do you mean a different class?
> Has an extraneous query created and never used
Yes I'm sure you can find quite a bit of stuff in the tests. The code has been tidied up over the years, but not completely.
> Never executes due to a lack of \@Test annotation.
It should just have an \@Ignore We don't need to have it as an expected failure as it's not a desirable failure.
> The reason is that GroupSymbol equals method does not test the 'shortname' field if the schema is null. This maybe by design?
Without a schema we know the groupsymbol is unresolved and is tested for equality based upon it's "full name". However the equality check here is in the SubqueryFromClause, which is not case sensitive. Previously the groupsymbol checks were case insensitive as well.
> Oversights in parser test unit tests
> ------------------------------------
>
> Key: TEIID-2808
> URL: https://issues.jboss.org/browse/TEIID-2808
> Project: Teiid
> Issue Type: Bug
> Components: Integration Tests
> Affects Versions: 8.4, 8.6
> Reporter: Paul Richardson
> Assignee: Steven Hawkins
> Priority: Minor
>
> While integrating the unit tests from TestParser into Designer's teiid runtime client codebase, I found several small issues with the tests. All the tests pass in TestParser under Teiid hence these items have not necessarily been noticed and its a question of whether they should be.
> * testArrayTable
> ** The Constant node class' equals method does not test the 'type' field if the 'value' field is null. This allows the test to pass when the constants in the expected and actual Commands trees have different types. Discussion with [~rareddy] concluded the equals method does this by design.
> ** Suggestion is change the expected Constant to have NullType as its 'type' rather than Object.
> * testBlockExceptionHandling
> ** The Block node class has no equals method hence this test passes even though the 'groupExpression' field is different between expected and actual.
> * testDynamicCommand1
> ** The ElementSymbol node class never considers its 'type' field in its equals method hence the test passes despite an expected type of Integer against an actual type of null.
> ** test has a typo when the expected var 'a1' has its type set twice to String then Integer.
> * testStoredQuery2SanityCheck
> ** Has an extraneous query created and never used
> * testStoredQuerySubqueryMultipleParens
> ** Never executes due to a lack of @Test annotation. Judging by the comment it might be an experiment that has been commented out by removing the annotation. Reinforced by test failing with parsing exception.
> * testStoredQueryWithNoParameter2
> ** The test passes but has different expected and actual GroupSymbols in the From clause since the 'shortname' field is actually "x" rather than the expected "X". The reason is that GroupSymbol equals method does not test the 'shortname' field if the schema is null. This maybe by design?
> ** Suggestion is to at least change the expected value to "X".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (TEIID-2808) Oversights in parser test unit tests
by Paul Richardson (JIRA)
Paul Richardson created TEIID-2808:
--------------------------------------
Summary: Oversights in parser test unit tests
Key: TEIID-2808
URL: https://issues.jboss.org/browse/TEIID-2808
Project: Teiid
Issue Type: Bug
Components: Integration Tests
Affects Versions: 8.6, 8.4
Reporter: Paul Richardson
Assignee: Steven Hawkins
Priority: Minor
While integrating the unit tests from TestParser into Designer's teiid runtime client codebase, I found several small issues with the tests. All the tests pass in TestParser under Teiid hence these items have not necessarily been noticed and its a question of whether they should be.
* testArrayTable
** The Constant node class' equals method does not test the 'type' field if the 'value' field is null. This allows the test to pass when the constants in the expected and actual Commands trees have different types. Discussion with [~rareddy] concluded the equals method does this by design.
** Suggestion is change the expected Constant to have NullType as its 'type' rather than Object.
* testBlockExceptionHandling
** The Block node class has no equals method hence this test passes even though the 'groupExpression' field is different between expected and actual.
* testDynamicCommand1
** The ElementSymbol node class never considers its 'type' field in its equals method hence the test passes despite an expected type of Integer against an actual type of null.
** test has a typo when the expected var 'a1' has its type set twice to String then Integer.
* testStoredQuery2SanityCheck
** Has an extraneous query created and never used
* testStoredQuerySubqueryMultipleParens
** Never executes due to a lack of @Test annotation. Judging by the comment it might be an experiment that has been commented out by removing the annotation. Reinforced by test failing with parsing exception.
* testStoredQueryWithNoParameter2
** The test passes but has different expected and actual GroupSymbols in the From clause since the 'shortname' field is actually "x" rather than the expected "X". The reason is that GroupSymbol equals method does not test the 'shortname' field if the schema is null. This maybe by design?
** Suggestion is to at least change the expected value to "X".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months