You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Gabriele Kahlout (JIRA)" <ji...@apache.org> on 2011/06/02 17:19:47 UTC

[jira] [Created] (SOLR-2573) Standard handler assumed as default in test breaks subclassing tests

Standard handler assumed as default in test breaks subclassing tests
--------------------------------------------------------------------

                 Key: SOLR-2573
                 URL: https://issues.apache.org/jira/browse/SOLR-2573
             Project: Solr
          Issue Type: Bug
            Reporter: Gabriele Kahlout
            Priority: Minor


'standard' is still specified as default qtype in TestHarness and SolrTestCaseJ4, which makes tests that rely on the default fail.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (SOLR-2573) Standard handler assumed as default in test breaks subclassing tests

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

Gabriele Kahlout updated SOLR-2573:
-----------------------------------

        Fix Version/s: 3.4
    Affects Version/s: 3.2

> Standard handler assumed as default in test breaks subclassing tests
> --------------------------------------------------------------------
>
>                 Key: SOLR-2573
>                 URL: https://issues.apache.org/jira/browse/SOLR-2573
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 3.2
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>             Fix For: 3.4
>
>         Attachments: SOLR-2573.patch
>
>
> 'standard' is still specified as default qtype in TestHarness and SolrTestCaseJ4, which makes tests that rely on the default fail.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-2573) Standard handler assumed as default in test breaks subclassing tests

Posted by "Gabriele Kahlout (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064444#comment-13064444 ] 

Gabriele Kahlout commented on SOLR-2573:
----------------------------------------

some test classes may have to be adjusted too? (I don't know how they currently work).
{code}
public class AlternateDirectoryTest extends SolrTestCaseJ4 {
  @BeforeClass
  public static void beforeClass() throws Exception {
    initCore("solrconfig-altdirectory.xml", "schema.xml");
  }

  /**
   * Simple test to ensure that alternate IndexReaderFactory is being used.
   * 
   * @throws Exception
   */
  @Test
  public void testAltDirectoryUsed() throws Exception {
    assertQ(req("q","*:*","qt","standard")); //STANDARD DOESN'T EXIST ANYMORE
{code}

> Standard handler assumed as default in test breaks subclassing tests
> --------------------------------------------------------------------
>
>                 Key: SOLR-2573
>                 URL: https://issues.apache.org/jira/browse/SOLR-2573
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 3.2
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>             Fix For: 3.4
>
>         Attachments: SOLR-2573.patch
>
>
> 'standard' is still specified as default qtype in TestHarness and SolrTestCaseJ4, which makes tests that rely on the default fail.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (SOLR-2573) Standard handler assumed as default in test breaks subclassing tests

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

Gabriele Kahlout updated SOLR-2573:
-----------------------------------

    Attachment: SOLR-2573.patch

Replaces qtype in affected test classes with StringUtils.EMPTY. Tested on own subclassing test (should probably have also added a test Solr case that indeed depends on the test value =( ) 

> Standard handler assumed as default in test breaks subclassing tests
> --------------------------------------------------------------------
>
>                 Key: SOLR-2573
>                 URL: https://issues.apache.org/jira/browse/SOLR-2573
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>         Attachments: SOLR-2573.patch
>
>
> 'standard' is still specified as default qtype in TestHarness and SolrTestCaseJ4, which makes tests that rely on the default fail.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Resolved] (SOLR-2573) Standard handler assumed as default in test breaks subclassing tests

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

Hoss Man resolved SOLR-2573.
----------------------------

       Resolution: Not A Problem
    Fix Version/s:     (was: 3.4)
         Assignee: Hoss Man



I don't think we should make this change

It's true that applying this patch would allow tests that want to use the default handler to work w/o explicitly asking for that handler, but it would break all existing tests for users who have test configs with a requestHandler defined named "standard" (which is not the default).  

Users who want to specify a differnet default handler name in their tests can continue to do what they have always done:
* explicitly set lrf.qtype="" in the setup of their test class
* specify a "qt"="" param when making a call to lrf.makeRequest() or req() in the test methods

bq. some test classes may have to be adjusted too? (I don't know how they currently work).
...
bq. assertQ(req("q","*:*","qt","standard")); //STANDARD DOESN'T EXIST ANYMORE

while we no longer suggest/recommend naming a requestHandler "standard" in the example solrconfig.xml file, requestHandler's named "standard" do in fact exist in many of the test configs


There are definitely improvements that can/should be made to the TestHarness and the LocalRequestFactory (neither of which have really kept up with all the changes in Solr over the years) but those improvements should be in the direction of changing the APIs and eliminating the extra layer of "defaults" in those classes that already exist in the SolrCore -- as long as we have those test apis/defaults, the defaults need to remain the same for back compat.

> Standard handler assumed as default in test breaks subclassing tests
> --------------------------------------------------------------------
>
>                 Key: SOLR-2573
>                 URL: https://issues.apache.org/jira/browse/SOLR-2573
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 3.2
>            Reporter: Gabriele Kahlout
>            Assignee: Hoss Man
>            Priority: Minor
>         Attachments: SOLR-2573.patch
>
>
> 'standard' is still specified as default qtype in TestHarness and SolrTestCaseJ4, which makes tests that rely on the default fail.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org