Re: Writing Unit test for SOLR Issue

2019-05-08 Thread David Smiley
Absolutely; there are plenty of PR based contributions. Just reference the exact issue in the PR title, e.g. SOLR-13331 ~ David Smiley Apache Lucene/Solr Search Developer http://www.linkedin.com/in/davidwsmiley On Fri, May 3, 2019 at 4:18 AM Thomas Wöckinger wrote: > Now that all apache

Re: Writing Unit test for SOLR Issue

2019-05-03 Thread Thomas Wöckinger
Now that all apache repos are moved to github, is it possible to do a pull request? I dont wan't to crunch all changes into one commit. Best, Tom On Thu, May 2, 2019 at 3:48 PM Thomas Wöckinger wrote: > In the middle of writing a test base, i realized that the > SolrJettyTestBase is using an

Re: Writing Unit test for SOLR Issue

2019-05-02 Thread Thomas Wöckinger
In the middle of writing a test base, i realized that the SolrJettyTestBase is using an EmbeddedSolrServer as its fallback. So two questions: 1.: Should i introduce a new EmbeddedSolrServerTestBase to clarify which implementations is used behind the scenes? 2.: I think it is a good idea two

Re: Writing Unit test for SOLR Issue

2019-05-02 Thread Thomas Wöckinger
Ok, thx for your fast response, i will start now, hope to be finished in two days. Best, Tom On Thu, May 2, 2019 at 12:59 PM Jason Gerlowski wrote: > Hi Thomas, > > No need to open a new issue. I added a few tests when I committed a > fix on SOLR-13331 a few weeks back. I backported this

Re: Writing Unit test for SOLR Issue

2019-05-02 Thread Jason Gerlowski
Hi Thomas, No need to open a new issue. I added a few tests when I committed a fix on SOLR-13331 a few weeks back. I backported this change and it should be fixed in 7.7.2 when that is released. The project could always use additional tests though, so if you want to add an EmbeddedSolrServer

Re: Writing Unit test for SOLR Issue

2019-05-02 Thread Thomas Wöckinger
As i already commented on the issue SOLR-13331 , i am starting writing test on this issue using EmbbededSolrServer, i didn't had time the last few weeks, should i open a new issue for this? I think backporting this to 7.x is also a good idea! On

Re: Writing Unit test for SOLR Issue

2019-03-26 Thread Jason Gerlowski
I'm only passingly familiar with EmbeddedSolrServer. But if you can reproduce the problem using EmbeddedSolrServer, then that'd be a great place to start for a test. If you aren't able to reproduce the problem with EmbeddedSolrServer though, you'll probably need to use HttpSolrClient and one of

Re: Writing Unit test for SOLR Issue

2019-03-26 Thread Thomas Wöckinger
I know SolrJ pretty well, so should i write the against EmbeddedSolrServer, or is there a different base class for such tests? On Tue, Mar 26, 2019 at 2:55 PM Jason Gerlowski wrote: > Hi Thomas, > > I see what you mean; the utilities used by that test as-is rely on > XML. If you want to send

Re: Writing Unit test for SOLR Issue

2019-03-26 Thread Jason Gerlowski
Hi Thomas, I see what you mean; the utilities used by that test as-is rely on XML. If you want to send the atomic-update via Javabin, the best option is probably to write a small testcase using SolrJ. Javabin is the default wire format in SolrJ, so it should do what you want. If you haven't

Re: Writing Unit test for SOLR Issue

2019-03-26 Thread Thomas Wöckinger
Following problem: TestHarness is using XMLLoader to test the whole test case, so it is not possible to test with ByteArrayUtf8CharSequence because it will be converted to String before. Can you guide me to create a TestHarness for which is using JavaBinCodec. Thx Tom On Mon, Mar 25, 2019 at

Re: Writing Unit test for SOLR Issue

2019-03-25 Thread Thomas Wöckinger
I think the class is the right one, but i am not sure if it is enough to test the issue just by using ByteArrayUtf8CharSequence as value for the updates. On Mon, Mar 25, 2019 at 8:42 PM Erick Erickson wrote: > Take a look at >

Re: Writing Unit test for SOLR Issue

2019-03-25 Thread Thomas Wöckinger
Ok, thx! How is the review done? Currently nobody is assigned to the issue. On Mon, Mar 25, 2019 at 8:42 PM Erick Erickson wrote: > Take a look at > …/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java > > If you don’t want to add tests to that class, that’ll be

Re: Writing Unit test for SOLR Issue

2019-03-25 Thread Erick Erickson
Take a look at …/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java If you don’t want to add tests to that class, that’ll be (roughly) the place you’d add a new test class. Best, Erick > On Mar 25, 2019, at 9:54 AM, Thomas Wöckinger > wrote: > > Hi! > > I submitted

Writing Unit test for SOLR Issue

2019-03-25 Thread Thomas Wöckinger
Hi! I submitted a patch for a solr bug https://issues.apache.org/jira/browse/SOLR-13331, i also want to add unit test for that issue. May someone can give me an advice where to add these unit test, because a simple test can be made easy but i think there should be also some integration tests,