You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Nicholas Paldino (JIRA)" <ji...@apache.org> on 2009/11/18 19:20:39 UTC

[jira] Created: (LUCENENET-283) TestDateRange and TestLegacyDateRange fail.

TestDateRange and TestLegacyDateRange fail.
-------------------------------------------

                 Key: LUCENENET-283
                 URL: https://issues.apache.org/jira/browse/LUCENENET-283
             Project: Lucene.Net
          Issue Type: Bug
            Reporter: Nicholas Paldino
            Priority: Minor


The tests for TestDateRange and TestLegacyDateRange fail.  Patch to follow.

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


[jira] Resolved: (LUCENENET-283) TestDateRange and TestLegacyDateRange fail.

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

Digy resolved LUCENENET-283.
----------------------------

    Resolution: Cannot Reproduce

committed.

> TestDateRange and TestLegacyDateRange fail.
> -------------------------------------------
>
>                 Key: LUCENENET-283
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-283
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Nicholas Paldino
>            Priority: Minor
>         Attachments: TestQueryParser.DateRangeTests.patch, TestQueryParser.patch
>
>
> The tests for TestDateRange and TestLegacyDateRange fail.  Patch to follow.

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


[jira] Resolved: (LUCENENET-283) TestDateRange and TestLegacyDateRange fail.

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

Digy resolved LUCENENET-283.
----------------------------

    Resolution: Fixed

> TestDateRange and TestLegacyDateRange fail.
> -------------------------------------------
>
>                 Key: LUCENENET-283
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-283
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Nicholas Paldino
>            Priority: Minor
>         Attachments: TestQueryParser.DateRangeTests.patch, TestQueryParser.patch
>
>
> The tests for TestDateRange and TestLegacyDateRange fail.  Patch to follow.

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


[jira] Updated: (LUCENENET-283) TestDateRange and TestLegacyDateRange fail.

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

Nicholas Paldino updated LUCENENET-283:
---------------------------------------

    Attachment: TestQueryParser.DateRangeTests.patch

The tests themselves are wrong.

In TestDateRange, testing a query which is exclusive of the bounds for two dates (1/1/2002 and 1/4/2002, en-US), it generates a date equal to the last millisecond on the end date to compare the queries (1/4/2002 23:59:59.999) and then compares the conversion of that string into the encoded format against what the string representation of the query is.

The problem is, the date that it actually uses is *2*/4/2002 23:59:59.999, which is a month off of what is expected.

The same problem occurs in TestLegacyDateRange.

To resolve, I created DateTime instances representing start/end dates at the beginning of each test method, and had all other dates that were generated and used for the tests use properties/methods from the values instead of relying on magic numbers to create instances (which caused the problem in the first place).

If the problem exists in the Java test cases as well, I suggest that the same thing be done there.

> TestDateRange and TestLegacyDateRange fail.
> -------------------------------------------
>
>                 Key: LUCENENET-283
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-283
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Nicholas Paldino
>            Priority: Minor
>         Attachments: TestQueryParser.DateRangeTests.patch
>
>
> The tests for TestDateRange and TestLegacyDateRange fail.  Patch to follow.

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


[jira] Commented: (LUCENENET-283) TestDateRange and TestLegacyDateRange fail.

Posted by "Michael Garski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENENET-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780241#action_12780241 ] 

Michael Garski commented on LUCENENET-283:
------------------------------------------

I would qualify the statement "we are not trying to apply best programming practices" with "at this time", as I'm certain everyone here wants to apply best practices while retaining all functionality and the file format of the Java version.

> TestDateRange and TestLegacyDateRange fail.
> -------------------------------------------
>
>                 Key: LUCENENET-283
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-283
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Nicholas Paldino
>            Priority: Minor
>         Attachments: TestQueryParser.DateRangeTests.patch, TestQueryParser.patch
>
>
> The tests for TestDateRange and TestLegacyDateRange fail.  Patch to follow.

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


[jira] Reopened: (LUCENENET-283) TestDateRange and TestLegacyDateRange fail.

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

Digy reopened LUCENENET-283:
----------------------------


> TestDateRange and TestLegacyDateRange fail.
> -------------------------------------------
>
>                 Key: LUCENENET-283
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-283
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Nicholas Paldino
>            Priority: Minor
>         Attachments: TestQueryParser.DateRangeTests.patch, TestQueryParser.patch
>
>
> The tests for TestDateRange and TestLegacyDateRange fail.  Patch to follow.

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


[jira] Commented: (LUCENENET-283) TestDateRange and TestLegacyDateRange fail.

Posted by "Nicholas Paldino (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENENET-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779584#action_12779584 ] 

Nicholas Paldino commented on LUCENENET-283:
--------------------------------------------

Note, this patch relies on the patch committed in LUCENENET-278 as well.  All tests for the TestQueryParser class should pass now.

> TestDateRange and TestLegacyDateRange fail.
> -------------------------------------------
>
>                 Key: LUCENENET-283
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-283
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Nicholas Paldino
>            Priority: Minor
>         Attachments: TestQueryParser.DateRangeTests.patch
>
>
> The tests for TestDateRange and TestLegacyDateRange fail.  Patch to follow.

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


[jira] Commented: (LUCENENET-283) TestDateRange and TestLegacyDateRange fail.

Posted by "Andrei Iliev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENENET-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780245#action_12780245 ] 

Andrei Iliev commented on LUCENENET-283:
----------------------------------------

+1

> TestDateRange and TestLegacyDateRange fail.
> -------------------------------------------
>
>                 Key: LUCENENET-283
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-283
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Nicholas Paldino
>            Priority: Minor
>         Attachments: TestQueryParser.DateRangeTests.patch, TestQueryParser.patch
>
>
> The tests for TestDateRange and TestLegacyDateRange fail.  Patch to follow.

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


[jira] Commented: (LUCENENET-283) TestDateRange and TestLegacyDateRange fail.

Posted by "Digy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENENET-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780249#action_12780249 ] 

Digy commented on LUCENENET-283:
--------------------------------

Of course, if you have enough man-power to keep up with Lucene.java.
DIGY

> TestDateRange and TestLegacyDateRange fail.
> -------------------------------------------
>
>                 Key: LUCENENET-283
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-283
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Nicholas Paldino
>            Priority: Minor
>         Attachments: TestQueryParser.DateRangeTests.patch, TestQueryParser.patch
>
>
> The tests for TestDateRange and TestLegacyDateRange fail.  Patch to follow.

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


[jira] Updated: (LUCENENET-283) TestDateRange and TestLegacyDateRange fail.

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

Digy updated LUCENENET-283:
---------------------------

    Attachment: TestQueryParser.patch

Hi Nicholas,
We are not trying to apply best programming practices, we are trying to keep Lucene.NET as close as possible to java.
So simple patch would be enough.
Now all tests under QueryParsers pass.

DIGY

> TestDateRange and TestLegacyDateRange fail.
> -------------------------------------------
>
>                 Key: LUCENENET-283
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-283
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Nicholas Paldino
>            Priority: Minor
>         Attachments: TestQueryParser.DateRangeTests.patch, TestQueryParser.patch
>
>
> The tests for TestDateRange and TestLegacyDateRange fail.  Patch to follow.

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