Re: Improve testing
Some useful documentation on the gradlew commands: https://github.com/apache/lucene/blob/main/help/workflow.txt On Sat, 25 May 2024 at 19:38, Stefan Vodita wrote: > I'll add a step in between 1 and 2 that I often forget: ./gradlew tidy > This refactors your code to the style the project uses, which we have > checks for. > > > On Sat, 25 May 2024 at 00:53, Michael Froh wrote: > >> Is your new test uncommitted? >> >> The Gradle check will fail if you have uncommitted files, to avoid the >> situation where it "works on my machine (because of a file that I forgot to >> commit)". >> >> The rough workflow is: >> >> 1. Develop stuff (code and/or tests). >> 2. Commit it. >> 3. Gradle check. >> 4. If Gradle check fails, then make changes and amend your commit. Go to >> 3. >> >> Hope that helps, >> Froh >> >> >> On Fri, May 24, 2024 at 3:31 PM Chang Hank >> wrote: >> >>> After I added the new test case, I failed the ./gradlew check and it >>> seems like the check failed because I added the new test case. >>> Is there anything I need to do before executing ./gradlew check? >>> >>> Best, >>> Hank >>> >>> > On May 24, 2024, at 12:53 PM, Chang Hank >>> wrote: >>> > >>> > Hi Robert, >>> > >>> > Thanks for your advice, will look into it!! >>> > >>> > Best, >>> > Hank >>> >> On May 24, 2024, at 12:46 PM, Robert Muir wrote: >>> >> >>> >> On Fri, May 24, 2024 at 2:33 PM Chang Hank >>> wrote: >>> >>> >>> >>> Hi all, >>> >>> >>> >>> I want to improve the code coverage for Lucene, which package would >>> you recommend testing to do so? Do we need more coverage in the Core >>> package? >>> >>> >>> >> >>> >> Hello, >>> >> >>> >> I'd recommend looking at the help/tests.txt file, you can generate the >>> >> coverage report easily and find untested code: >>> >> >>> >> https://github.com/apache/lucene/blob/main/help/tests.txt#L193 >>> >> >>> >> - >>> >> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org >>> >> For additional commands, e-mail: dev-h...@lucene.apache.org >>> >> >>> > >>> >>> >>> - >>> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org >>> For additional commands, e-mail: dev-h...@lucene.apache.org >>> >>>
Re: Improve testing
I'll add a step in between 1 and 2 that I often forget: ./gradlew tidy This refactors your code to the style the project uses, which we have checks for. On Sat, 25 May 2024 at 00:53, Michael Froh wrote: > Is your new test uncommitted? > > The Gradle check will fail if you have uncommitted files, to avoid the > situation where it "works on my machine (because of a file that I forgot to > commit)". > > The rough workflow is: > > 1. Develop stuff (code and/or tests). > 2. Commit it. > 3. Gradle check. > 4. If Gradle check fails, then make changes and amend your commit. Go to 3. > > Hope that helps, > Froh > > > On Fri, May 24, 2024 at 3:31 PM Chang Hank > wrote: > >> After I added the new test case, I failed the ./gradlew check and it >> seems like the check failed because I added the new test case. >> Is there anything I need to do before executing ./gradlew check? >> >> Best, >> Hank >> >> > On May 24, 2024, at 12:53 PM, Chang Hank >> wrote: >> > >> > Hi Robert, >> > >> > Thanks for your advice, will look into it!! >> > >> > Best, >> > Hank >> >> On May 24, 2024, at 12:46 PM, Robert Muir wrote: >> >> >> >> On Fri, May 24, 2024 at 2:33 PM Chang Hank >> wrote: >> >>> >> >>> Hi all, >> >>> >> >>> I want to improve the code coverage for Lucene, which package would >> you recommend testing to do so? Do we need more coverage in the Core >> package? >> >>> >> >> >> >> Hello, >> >> >> >> I'd recommend looking at the help/tests.txt file, you can generate the >> >> coverage report easily and find untested code: >> >> >> >> https://github.com/apache/lucene/blob/main/help/tests.txt#L193 >> >> >> >> - >> >> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org >> >> For additional commands, e-mail: dev-h...@lucene.apache.org >> >> >> > >> >> >> - >> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org >> For additional commands, e-mail: dev-h...@lucene.apache.org >> >>
Re: Improve testing
Is your new test uncommitted? The Gradle check will fail if you have uncommitted files, to avoid the situation where it "works on my machine (because of a file that I forgot to commit)". The rough workflow is: 1. Develop stuff (code and/or tests). 2. Commit it. 3. Gradle check. 4. If Gradle check fails, then make changes and amend your commit. Go to 3. Hope that helps, Froh On Fri, May 24, 2024 at 3:31 PM Chang Hank wrote: > After I added the new test case, I failed the ./gradlew check and it seems > like the check failed because I added the new test case. > Is there anything I need to do before executing ./gradlew check? > > Best, > Hank > > > On May 24, 2024, at 12:53 PM, Chang Hank > wrote: > > > > Hi Robert, > > > > Thanks for your advice, will look into it!! > > > > Best, > > Hank > >> On May 24, 2024, at 12:46 PM, Robert Muir wrote: > >> > >> On Fri, May 24, 2024 at 2:33 PM Chang Hank > wrote: > >>> > >>> Hi all, > >>> > >>> I want to improve the code coverage for Lucene, which package would > you recommend testing to do so? Do we need more coverage in the Core > package? > >>> > >> > >> Hello, > >> > >> I'd recommend looking at the help/tests.txt file, you can generate the > >> coverage report easily and find untested code: > >> > >> https://github.com/apache/lucene/blob/main/help/tests.txt#L193 > >> > >> - > >> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org > >> For additional commands, e-mail: dev-h...@lucene.apache.org > >> > > > > > - > To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org > For additional commands, e-mail: dev-h...@lucene.apache.org > >
Re: Improve testing
After I added the new test case, I failed the ./gradlew check and it seems like the check failed because I added the new test case. Is there anything I need to do before executing ./gradlew check? Best, Hank > On May 24, 2024, at 12:53 PM, Chang Hank wrote: > > Hi Robert, > > Thanks for your advice, will look into it!! > > Best, > Hank >> On May 24, 2024, at 12:46 PM, Robert Muir wrote: >> >> On Fri, May 24, 2024 at 2:33 PM Chang Hank wrote: >>> >>> Hi all, >>> >>> I want to improve the code coverage for Lucene, which package would you >>> recommend testing to do so? Do we need more coverage in the Core package? >>> >> >> Hello, >> >> I'd recommend looking at the help/tests.txt file, you can generate the >> coverage report easily and find untested code: >> >> https://github.com/apache/lucene/blob/main/help/tests.txt#L193 >> >> - >> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org >> For additional commands, e-mail: dev-h...@lucene.apache.org >> > - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
Re: Improve testing
Hi Robert, Thanks for your advice, will look into it!! Best, Hank > On May 24, 2024, at 12:46 PM, Robert Muir wrote: > > On Fri, May 24, 2024 at 2:33 PM Chang Hank wrote: >> >> Hi all, >> >> I want to improve the code coverage for Lucene, which package would you >> recommend testing to do so? Do we need more coverage in the Core package? >> > > Hello, > > I'd recommend looking at the help/tests.txt file, you can generate the > coverage report easily and find untested code: > > https://github.com/apache/lucene/blob/main/help/tests.txt#L193 > > - > To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org > For additional commands, e-mail: dev-h...@lucene.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
Re: Improve testing
On Fri, May 24, 2024 at 2:33 PM Chang Hank wrote: > > Hi all, > > I want to improve the code coverage for Lucene, which package would you > recommend testing to do so? Do we need more coverage in the Core package? > Hello, I'd recommend looking at the help/tests.txt file, you can generate the coverage report easily and find untested code: https://github.com/apache/lucene/blob/main/help/tests.txt#L193 - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
Improve testing
Hi all, I want to improve the code coverage for Lucene, which package would you recommend testing to do so? Do we need more coverage in the Core package? Best, Hank - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-2331) Refactor CoreContainer's SolrXML serialization code and improve testing
[ https://issues.apache.org/jira/browse/SOLR-2331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078526#comment-13078526 ] Yury Kats commented on SOLR-2331: - Looks like this introduced a regression in solr.xml persistence. See SOLR-2691. > Refactor CoreContainer's SolrXML serialization code and improve testing > --- > > Key: SOLR-2331 > URL: https://issues.apache.org/jira/browse/SOLR-2331 > Project: Solr > Issue Type: Improvement > Components: multicore >Reporter: Mark Miller >Assignee: Mark Miller >Priority: Minor > Fix For: 4.0 > > Attachments: SOLR-2331-fix-windows-file-deletion-failure.patch, > SOLR-2331-fix-windows-file-deletion-failure.patch, SOLR-2331.patch > > > CoreContainer has enough code in it - I'd like to factor out the solr.xml > serialization code into SolrXMLSerializer or something - which should make > testing it much easier and lightweight. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Issue Comment Edited] (SOLR-2331) Refactor CoreContainer's SolrXML serialization code and improve testing
[ https://issues.apache.org/jira/browse/SOLR-2331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061973#comment-13061973 ] Mark Miller edited comment on SOLR-2331 at 7/8/11 2:23 PM: --- Thanks Steve - calling this one done - CoreContainer needs more refactoring, but it can come in further issues. Noble has a great one going to factor out zookeeper parts as well. was (Author: markrmil...@gmail.com): Thanks Steve - calling this one done - SolrCore needs more refactoring, but it can come in further issues. Noble has a great one going to factor out zookeeper parts as well. > Refactor CoreContainer's SolrXML serialization code and improve testing > --- > > Key: SOLR-2331 > URL: https://issues.apache.org/jira/browse/SOLR-2331 > Project: Solr > Issue Type: Improvement > Components: multicore >Reporter: Mark Miller >Assignee: Mark Miller >Priority: Minor > Fix For: 4.0 > > Attachments: SOLR-2331-fix-windows-file-deletion-failure.patch, > SOLR-2331-fix-windows-file-deletion-failure.patch, SOLR-2331.patch > > > CoreContainer has enough code in it - I'd like to factor out the solr.xml > serialization code into SolrXMLSerializer or something - which should make > testing it much easier and lightweight. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Resolved] (SOLR-2331) Refactor CoreContainer's SolrXML serialization code and improve testing
[ https://issues.apache.org/jira/browse/SOLR-2331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Miller resolved SOLR-2331. --- Resolution: Fixed Thanks Steve - calling this one done - SolrCore needs more refactoring, but it can come in further issues. Noble has a great one going to factor out zookeeper parts as well. > Refactor CoreContainer's SolrXML serialization code and improve testing > --- > > Key: SOLR-2331 > URL: https://issues.apache.org/jira/browse/SOLR-2331 > Project: Solr > Issue Type: Improvement > Components: multicore >Reporter: Mark Miller >Assignee: Mark Miller >Priority: Minor > Fix For: 4.0 > > Attachments: SOLR-2331-fix-windows-file-deletion-failure.patch, > SOLR-2331-fix-windows-file-deletion-failure.patch, SOLR-2331.patch > > > CoreContainer has enough code in it - I'd like to factor out the solr.xml > serialization code into SolrXMLSerializer or something - which should make > testing it much easier and lightweight. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-2331) Refactor CoreContainer's SolrXML serialization code and improve testing
[ https://issues.apache.org/jira/browse/SOLR-2331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061793#comment-13061793 ] Bill Bell commented on SOLR-2331: - Commit? +1 > Refactor CoreContainer's SolrXML serialization code and improve testing > --- > > Key: SOLR-2331 > URL: https://issues.apache.org/jira/browse/SOLR-2331 > Project: Solr > Issue Type: Improvement > Components: multicore >Reporter: Mark Miller >Assignee: Mark Miller >Priority: Minor > Fix For: 4.0 > > Attachments: SOLR-2331-fix-windows-file-deletion-failure.patch, > SOLR-2331-fix-windows-file-deletion-failure.patch, SOLR-2331.patch > > > CoreContainer has enough code in it - I'd like to factor out the solr.xml > serialization code into SolrXMLSerializer or something - which should make > testing it much easier and lightweight. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-2331) Refactor CoreContainer's SolrXML serialization code and improve testing
[ https://issues.apache.org/jira/browse/SOLR-2331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061649#comment-13061649 ] Steven Rowe commented on SOLR-2331: --- bq. This patch de-anonymizes the FileInputStream and closes it after the file contents are printed out [and] wraps the persisted core config printing to STDOUT in an {{if (VERBOSE)}} block. Committed in r1144088. > Refactor CoreContainer's SolrXML serialization code and improve testing > --- > > Key: SOLR-2331 > URL: https://issues.apache.org/jira/browse/SOLR-2331 > Project: Solr > Issue Type: Improvement > Components: multicore >Reporter: Mark Miller >Assignee: Mark Miller >Priority: Minor > Fix For: 4.0 > > Attachments: SOLR-2331-fix-windows-file-deletion-failure.patch, > SOLR-2331-fix-windows-file-deletion-failure.patch, SOLR-2331.patch > > > CoreContainer has enough code in it - I'd like to factor out the solr.xml > serialization code into SolrXMLSerializer or something - which should make > testing it much easier and lightweight. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-2331) Refactor CoreContainer's SolrXML serialization code and improve testing
[ https://issues.apache.org/jira/browse/SOLR-2331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steven Rowe updated SOLR-2331: -- Attachment: SOLR-2331-fix-windows-file-deletion-failure.patch This version of the patch wraps the persisted core config printing to STDOUT in an {{if (VERBOSE)}} block. Committing shortly. > Refactor CoreContainer's SolrXML serialization code and improve testing > --- > > Key: SOLR-2331 > URL: https://issues.apache.org/jira/browse/SOLR-2331 > Project: Solr > Issue Type: Improvement > Components: multicore >Reporter: Mark Miller >Assignee: Mark Miller >Priority: Minor > Fix For: 4.0 > > Attachments: SOLR-2331-fix-windows-file-deletion-failure.patch, > SOLR-2331-fix-windows-file-deletion-failure.patch, SOLR-2331.patch > > > CoreContainer has enough code in it - I'd like to factor out the solr.xml > serialization code into SolrXMLSerializer or something - which should make > testing it much easier and lightweight. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-2331) Refactor CoreContainer's SolrXML serialization code and improve testing
[ https://issues.apache.org/jira/browse/SOLR-2331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steven Rowe updated SOLR-2331: -- Attachment: SOLR-2331-fix-windows-file-deletion-failure.patch I reopened SOLR-2500 because TestSolrProperties is failing consistently on Windows 7/Oracle JDK 1.6.0_21 for me, but it appears that this is the issue that introduced the problem. I've tracked the issue down to the anonymous {{FileInputStream}} created in order to print out the contents of the persisted core configuration to STDOUT -- the following line was uncommented when Mark committed the patch on this issue: {code:java} 206: System.out.println(IOUtils.toString(new FileInputStream(new File(solrXml.getParent(), "solr-persist.xml"; {code} This patch de-anonymizes the {{FileInputStream}} and closes it after the file contents are printed out. I plan to commit this later tonight. > Refactor CoreContainer's SolrXML serialization code and improve testing > --- > > Key: SOLR-2331 > URL: https://issues.apache.org/jira/browse/SOLR-2331 > Project: Solr > Issue Type: Improvement > Components: multicore >Reporter: Mark Miller >Assignee: Mark Miller >Priority: Minor > Fix For: 4.0 > > Attachments: SOLR-2331-fix-windows-file-deletion-failure.patch, > SOLR-2331.patch > > > CoreContainer has enough code in it - I'd like to factor out the solr.xml > serialization code into SolrXMLSerializer or something - which should make > testing it much easier and lightweight. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-2331) Refactor CoreContainer's SolrXML serialization code and improve testing
[ https://issues.apache.org/jira/browse/SOLR-2331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13059855#comment-13059855 ] Mark Miller commented on SOLR-2331: --- bq. one step further and pull out the load functionality Yeah, I think the idea is good. I think some of the 'load' code could also be pulled up into the SolrXMLSerializer. If no one objects, I'd like to commit this part soon though - then tackle the load side later. > Refactor CoreContainer's SolrXML serialization code and improve testing > --- > > Key: SOLR-2331 > URL: https://issues.apache.org/jira/browse/SOLR-2331 > Project: Solr > Issue Type: Improvement > Components: multicore >Reporter: Mark Miller >Assignee: Mark Miller >Priority: Minor > Fix For: 4.0 > > Attachments: SOLR-2331.patch > > > CoreContainer has enough code in it - I'd like to factor out the solr.xml > serialization code into SolrXMLSerializer or something - which should make > testing it much easier and lightweight. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] Commented: (SOLR-2331) Refactor CoreContainer's SolrXML serialization code and improve testing
[ https://issues.apache.org/jira/browse/SOLR-2331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985460#action_12985460 ] Chris Male commented on SOLR-2331: -- Hey Mark, +1 to this. Is it possible to go one step further and pull out the load functionality too? Then they both can go into a class which manages the reading and writing. It'd be a nice step towards abstracting away from the solr.xml file being the only way to configure a CoreContainer. > Refactor CoreContainer's SolrXML serialization code and improve testing > --- > > Key: SOLR-2331 > URL: https://issues.apache.org/jira/browse/SOLR-2331 > Project: Solr > Issue Type: Improvement > Components: multicore >Reporter: Mark Miller >Assignee: Mark Miller >Priority: Minor > Fix For: 4.0 > > Attachments: SOLR-2331.patch > > > CoreContainer has enough code in it - I'd like to factor out the solr.xml > serialization code into SolrXMLSerializer or something - which should make > testing it much easier and lightweight. -- 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-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] Updated: (SOLR-2331) Refactor CoreContainer's SolrXML serialization code and improve testing
[ https://issues.apache.org/jira/browse/SOLR-2331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Miller updated SOLR-2331: -- Attachment: SOLR-2331.patch Here is a first pass - more to come. > Refactor CoreContainer's SolrXML serialization code and improve testing > --- > > Key: SOLR-2331 > URL: https://issues.apache.org/jira/browse/SOLR-2331 > Project: Solr > Issue Type: Improvement > Components: multicore >Reporter: Mark Miller >Assignee: Mark Miller >Priority: Minor > Fix For: 4.0 > > Attachments: SOLR-2331.patch > > > CoreContainer has enough code in it - I'd like to factor out the solr.xml > serialization code into SolrXMLSerializer or something - which should make > testing it much easier and lightweight. -- 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-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] Created: (SOLR-2331) Refactor CoreContainer's SolrXML serialization code and improve testing
Refactor CoreContainer's SolrXML serialization code and improve testing --- Key: SOLR-2331 URL: https://issues.apache.org/jira/browse/SOLR-2331 Project: Solr Issue Type: Improvement Components: multicore Reporter: Mark Miller Assignee: Mark Miller Priority: Minor Fix For: 4.0 CoreContainer has enough code in it - I'd like to factor out the solr.xml serialization code into SolrXMLSerializer or something - which should make testing it much easier and lightweight. -- 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-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org