I had another thought which is that often the reason we are grabbing JSON from 
some random URL is because we don’t have SolrJ support for that specific API.   
However, with the upcoming V2 api’s and the code generated Java client objects, 
maybe we could start using them in our tests.

This would let us use Java code with all the type support in a lot of places.   
Another reason to push forward on the V2 API’s!!!


Eric


> On Sep 29, 2023, at 10:46 AM, Eric Pugh <ep...@opensourceconnections.com> 
> wrote:
> 
> In SOLR-14496 for adding basic auth to our CLI, I ran again into “I need to 
> call an end point that spits back JSON and do something with it”.   
> 
> Specifically, you can see this rather convoluted method 
> https://github.com/apache/solr/pull/1954/files#diff-9cf9bffde79b0e6e23224cd3240c4a2b281ba91eed9ad1fb050759b2018f4f3c
>   testForResponseElement.
> 
> It is copied from TestSolrConfigHandler.testForResponseElement but then 
> reworked to actually use the ApiTool under the covers.   Good?  Bad?  Dunno.
> 
> I feel like through the code base, both in the code and tests, multiple 
> places we need to do this, and they each work a bit different.   Including my 
> own flavour that I just added using the ApiTool!
> 
> Are there any strong opinions on the “right way” that exist out there that we 
> could try and standardize around?  I’d be willing to invest in the migration 
> work if we had a “right way” ;-).
> 
> Eric
> _______________________
> Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 | 
> http://www.opensourceconnections.com <http://www.opensourceconnections.com/> 
> | My Free/Busy <http://tinyurl.com/eric-cal>  
> Co-Author: Apache Solr Enterprise Search Server, 3rd Ed 
> <https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw>
>   
> This e-mail and all contents, including attachments, is considered to be 
> Company Confidential unless explicitly stated otherwise, regardless of 
> whether attachments are marked as such.
> 

_______________________
Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 | 
http://www.opensourceconnections.com <http://www.opensourceconnections.com/> | 
My Free/Busy <http://tinyurl.com/eric-cal>  
Co-Author: Apache Solr Enterprise Search Server, 3rd Ed 
<https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw>
    
This e-mail and all contents, including attachments, is considered to be 
Company Confidential unless explicitly stated otherwise, regardless of whether 
attachments are marked as such.

Reply via email to