[ 
https://issues.apache.org/jira/browse/SOLR-10235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15898878#comment-15898878
 ] 

Uwe Schindler commented on SOLR-10235:
--------------------------------------

Hi [~hossman],
thanks for converting it, but there are 2 issues: {{getPropertyInfo(String url, 
Properties info)}} and {{jdbcCompliant()}} miss to delegate to wrapper; they 
call themselves leading to stack overflow. It looks like they are not called, 
but if the test gets extended it may overflow.

Otherwise, I'd make the Mock setup in the constructor of the wrapper. With the 
current code, if the JDBC driver would actually create a new instance of the 
wrapper based on the class name, the driver would not have the recorded 
behaviour. To do this reove "static" from the inner class. 
{{getMockitoDriver()}} is then also obsolete.

Finally, add {{@Override}}.

> fix last TestJdbcDataSource / mock issue with java9
> ---------------------------------------------------
>
>                 Key: SOLR-10235
>                 URL: https://issues.apache.org/jira/browse/SOLR-10235
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Hoss Man
>              Labels: java9
>         Attachments: SOLR-10235.patch
>
>
> The way TestJdbcDataSource was converted to use Mockito in SOLR-9966 still 
> left one outstanding test that was incompatible with Java9: 
> {{testRetrieveFromDriverManager()}} 
> The way this test worked with mock classes was also sketchy, but under java9 
> (even with Mockito) the attempt at using class names to resolve things in the 
> standard SQL DriverManager isn't viable.
> It seems like any easy fix is to create _real_ class (with a real/fixed 
> classname) that acts as a wrapper around a mockito "Driver" instance just for 
> the purposes of checking that the DriverManaer related code is working 
> properly.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to