You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2010/12/27 18:36:45 UTC

[jira] Created: (SOLR-2299) improve test-running from eclipse

improve test-running from eclipse
---------------------------------

                 Key: SOLR-2299
                 URL: https://issues.apache.org/jira/browse/SOLR-2299
             Project: Solr
          Issue Type: Test
          Components: Build
            Reporter: Robert Muir
             Fix For: 3.1, 4.0


In eclipse, its currently difficult to get a solr development environment working.

One big thing that would help would be to make it easier to run the tests.
When loading resources, if we checked the config dir + file directory from the resource path,
then users could simply add src/test/test-files to their eclipse build classpath, and tests would just work from the IDE.

I gather that this might make things easier for other IDEs too, though I'm aware that ones like Intellij
let you configure the test 'working directory' on a project basis, but eclipse doesn't 
(you have to make a custom run configuration every time you run the tests)

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


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


[jira] Updated: (SOLR-2299) improve test-running from eclipse

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

Robert Muir updated SOLR-2299:
------------------------------

    Attachment: SOLR-2299.patch

I'm sure this isn't perfect, for example contrib tests and tests that use the example configuration likely won't work.

But I think the majority of tests seem to work this way out of box if you add src/test/test-files to your classpath (right click src/test/test-files, Build->Add to Build Path)

> improve test-running from eclipse
> ---------------------------------
>
>                 Key: SOLR-2299
>                 URL: https://issues.apache.org/jira/browse/SOLR-2299
>             Project: Solr
>          Issue Type: Test
>          Components: Build
>            Reporter: Robert Muir
>             Fix For: 3.1, 4.0
>
>         Attachments: SOLR-2299.patch
>
>
> In eclipse, its currently difficult to get a solr development environment working.
> One big thing that would help would be to make it easier to run the tests.
> When loading resources, if we checked the config dir + file directory from the resource path,
> then users could simply add src/test/test-files to their eclipse build classpath, and tests would just work from the IDE.
> I gather that this might make things easier for other IDEs too, though I'm aware that ones like Intellij
> let you configure the test 'working directory' on a project basis, but eclipse doesn't 
> (you have to make a custom run configuration every time you run the tests)

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


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


[jira] Commented: (SOLR-2299) improve test-running from eclipse

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

Robert Muir commented on SOLR-2299:
-----------------------------------

looks like a bug in dih, masked all along because we set the CWD before.

I think it is not properly respecting solr home? but trying to write to solr/...

as for speed the tests are the same here, like 2 minutes. but, if dih is spewing exceptions,
the test runner buffering could be slowing you down,

I think we should open an issue to fix this bug in dih... this issue merely unmasked it

> improve test-running from eclipse
> ---------------------------------
>
>                 Key: SOLR-2299
>                 URL: https://issues.apache.org/jira/browse/SOLR-2299
>             Project: Solr
>          Issue Type: Test
>          Components: Build
>            Reporter: Robert Muir
>             Fix For: 3.1, 4.0
>
>         Attachments: SOLR-2299.patch, SOLR-2299.patch, SOLR-2299_part2.patch
>
>
> In eclipse, its currently difficult to get a solr development environment working.
> One big thing that would help would be to make it easier to run the tests.
> When loading resources, if we checked the config dir + file directory from the resource path,
> then users could simply add src/test/test-files to their eclipse build classpath, and tests would just work from the IDE.
> I gather that this might make things easier for other IDEs too, though I'm aware that ones like Intellij
> let you configure the test 'working directory' on a project basis, but eclipse doesn't 
> (you have to make a custom run configuration every time you run the tests)

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


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


[jira] Commented: (SOLR-2299) improve test-running from eclipse

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

Mark Miller commented on SOLR-2299:
-----------------------------------

Nice Robert, thank you.

> improve test-running from eclipse
> ---------------------------------
>
>                 Key: SOLR-2299
>                 URL: https://issues.apache.org/jira/browse/SOLR-2299
>             Project: Solr
>          Issue Type: Test
>          Components: Build
>            Reporter: Robert Muir
>             Fix For: 3.1, 4.0
>
>         Attachments: SOLR-2299.patch, SOLR-2299.patch, SOLR-2299_part2.patch
>
>
> In eclipse, its currently difficult to get a solr development environment working.
> One big thing that would help would be to make it easier to run the tests.
> When loading resources, if we checked the config dir + file directory from the resource path,
> then users could simply add src/test/test-files to their eclipse build classpath, and tests would just work from the IDE.
> I gather that this might make things easier for other IDEs too, though I'm aware that ones like Intellij
> let you configure the test 'working directory' on a project basis, but eclipse doesn't 
> (you have to make a custom run configuration every time you run the tests)

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


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


[jira] Resolved: (SOLR-2299) improve test-running from eclipse

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

Robert Muir resolved SOLR-2299.
-------------------------------

    Resolution: Fixed

> improve test-running from eclipse
> ---------------------------------
>
>                 Key: SOLR-2299
>                 URL: https://issues.apache.org/jira/browse/SOLR-2299
>             Project: Solr
>          Issue Type: Test
>          Components: Build
>            Reporter: Robert Muir
>             Fix For: 3.1, 4.0
>
>         Attachments: SOLR-2299.patch, SOLR-2299.patch, SOLR-2299_part2.patch
>
>
> In eclipse, its currently difficult to get a solr development environment working.
> One big thing that would help would be to make it easier to run the tests.
> When loading resources, if we checked the config dir + file directory from the resource path,
> then users could simply add src/test/test-files to their eclipse build classpath, and tests would just work from the IDE.
> I gather that this might make things easier for other IDEs too, though I'm aware that ones like Intellij
> let you configure the test 'working directory' on a project basis, but eclipse doesn't 
> (you have to make a custom run configuration every time you run the tests)

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


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


[jira] Commented: (SOLR-2299) improve test-running from eclipse

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

Robert Muir commented on SOLR-2299:
-----------------------------------

I ran all the core tests this way, most passed.

The only problems were example tests (perhaps i can figure out a way to make these work too, by adding something to the classpath or something like that), and a couple tests that explicitly use File et al versus general resources.


> improve test-running from eclipse
> ---------------------------------
>
>                 Key: SOLR-2299
>                 URL: https://issues.apache.org/jira/browse/SOLR-2299
>             Project: Solr
>          Issue Type: Test
>          Components: Build
>            Reporter: Robert Muir
>             Fix For: 3.1, 4.0
>
>         Attachments: SOLR-2299.patch
>
>
> In eclipse, its currently difficult to get a solr development environment working.
> One big thing that would help would be to make it easier to run the tests.
> When loading resources, if we checked the config dir + file directory from the resource path,
> then users could simply add src/test/test-files to their eclipse build classpath, and tests would just work from the IDE.
> I gather that this might make things easier for other IDEs too, though I'm aware that ones like Intellij
> let you configure the test 'working directory' on a project basis, but eclipse doesn't 
> (you have to make a custom run configuration every time you run the tests)

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


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


[jira] Updated: (SOLR-2299) improve test-running from eclipse

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

Robert Muir updated SOLR-2299:
------------------------------

    Attachment: SOLR-2299.patch

Same patch, i only fixed a couple tests that explicitly used File to use resources instead.

I looked at all the failing ones, its a little bit of work but I think its definitely feasible that
we get the solr tests working so that:
# you put test resources in classpath
# tests are independent of current working directory.

I think this is just a good general simplification (nothing to do with eclipse) and is good
for the ant build too, so that tests dont have to run with a CWD of src/test/test-files in ant.

The problem with the way we do this now (even in ant) is that i've sporatically seen tests actually create files in this CWD, which means we are creating leftovers in a src directory that could accidentally be committed, among other problems.

I'd like to commit this now and iterate on the remaining individual tests so that they open their test resources all as resources... its not that many left but some are tricky.


> improve test-running from eclipse
> ---------------------------------
>
>                 Key: SOLR-2299
>                 URL: https://issues.apache.org/jira/browse/SOLR-2299
>             Project: Solr
>          Issue Type: Test
>          Components: Build
>            Reporter: Robert Muir
>             Fix For: 3.1, 4.0
>
>         Attachments: SOLR-2299.patch, SOLR-2299.patch
>
>
> In eclipse, its currently difficult to get a solr development environment working.
> One big thing that would help would be to make it easier to run the tests.
> When loading resources, if we checked the config dir + file directory from the resource path,
> then users could simply add src/test/test-files to their eclipse build classpath, and tests would just work from the IDE.
> I gather that this might make things easier for other IDEs too, though I'm aware that ones like Intellij
> let you configure the test 'working directory' on a project basis, but eclipse doesn't 
> (you have to make a custom run configuration every time you run the tests)

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


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


[jira] Commented: (SOLR-2299) improve test-running from eclipse

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

Yonik Seeley commented on SOLR-2299:
------------------------------------

bq. as for speed the tests are the same here, like 2 minutes. but, if dih is spewing exceptions, the test runner buffering could be slowing you down

Hmmm, I was unable to reproduce the slowdown - false alarm!

> improve test-running from eclipse
> ---------------------------------
>
>                 Key: SOLR-2299
>                 URL: https://issues.apache.org/jira/browse/SOLR-2299
>             Project: Solr
>          Issue Type: Test
>          Components: Build
>            Reporter: Robert Muir
>             Fix For: 3.1, 4.0
>
>         Attachments: SOLR-2299.patch, SOLR-2299.patch, SOLR-2299_part2.patch
>
>
> In eclipse, its currently difficult to get a solr development environment working.
> One big thing that would help would be to make it easier to run the tests.
> When loading resources, if we checked the config dir + file directory from the resource path,
> then users could simply add src/test/test-files to their eclipse build classpath, and tests would just work from the IDE.
> I gather that this might make things easier for other IDEs too, though I'm aware that ones like Intellij
> let you configure the test 'working directory' on a project basis, but eclipse doesn't 
> (you have to make a custom run configuration every time you run the tests)

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


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


[jira] Commented: (SOLR-2299) improve test-running from eclipse

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

Yonik Seeley commented on SOLR-2299:
------------------------------------

I think I'm seeing more exceptions come out of the DIH tests (and the complete solr  test suite suddenly takes longer to run too... from ~5 to ~8 min).  Looks like it may be related to this issue/changes?

{code}
    [junit] SEVERE: Could not write property file
    [junit] org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to persist Index Start Time Processing Document # 2
    [junit]     at org.apache.solr.handler.dataimport.SolrWriter.persist(SolrWriter.java:111)
[...]
    [junit] Caused by: java.io.FileNotFoundException: solr-dih\conf\dataimport.properties (The system cannot find the path specified)
    [junit]     at java.io.FileOutputStream.open(Native Method)
    [junit]     at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    [junit]     at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
    [junit]     at org.apache.solr.handler.dataimport.SolrWriter.persist(SolrWriter.java:107)
{code}

This doesn't cause the test to fail for some reason...
Some of the methods are ignored because of TZ issues... but not all seem to fall into that category.

> improve test-running from eclipse
> ---------------------------------
>
>                 Key: SOLR-2299
>                 URL: https://issues.apache.org/jira/browse/SOLR-2299
>             Project: Solr
>          Issue Type: Test
>          Components: Build
>            Reporter: Robert Muir
>             Fix For: 3.1, 4.0
>
>         Attachments: SOLR-2299.patch, SOLR-2299.patch, SOLR-2299_part2.patch
>
>
> In eclipse, its currently difficult to get a solr development environment working.
> One big thing that would help would be to make it easier to run the tests.
> When loading resources, if we checked the config dir + file directory from the resource path,
> then users could simply add src/test/test-files to their eclipse build classpath, and tests would just work from the IDE.
> I gather that this might make things easier for other IDEs too, though I'm aware that ones like Intellij
> let you configure the test 'working directory' on a project basis, but eclipse doesn't 
> (you have to make a custom run configuration every time you run the tests)

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


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


[jira] Updated: (SOLR-2299) improve test-running from eclipse

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

Robert Muir updated SOLR-2299:
------------------------------

    Attachment: SOLR-2299_part2.patch

here's a patch fixing a lot of tests, only a few core tests left.

> improve test-running from eclipse
> ---------------------------------
>
>                 Key: SOLR-2299
>                 URL: https://issues.apache.org/jira/browse/SOLR-2299
>             Project: Solr
>          Issue Type: Test
>          Components: Build
>            Reporter: Robert Muir
>             Fix For: 3.1, 4.0
>
>         Attachments: SOLR-2299.patch, SOLR-2299.patch, SOLR-2299_part2.patch
>
>
> In eclipse, its currently difficult to get a solr development environment working.
> One big thing that would help would be to make it easier to run the tests.
> When loading resources, if we checked the config dir + file directory from the resource path,
> then users could simply add src/test/test-files to their eclipse build classpath, and tests would just work from the IDE.
> I gather that this might make things easier for other IDEs too, though I'm aware that ones like Intellij
> let you configure the test 'working directory' on a project basis, but eclipse doesn't 
> (you have to make a custom run configuration every time you run the tests)

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


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