[ https://issues.apache.org/jira/browse/SOLR-10235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15899816#comment-15899816 ]
Hoss Man commented on SOLR-10235: --------------------------------- bq. I can add a note to the Javadocs why it is not a mock, but the purpose of this class is identical to the other "mock" classes in this package (there is a mock JNDI Data Source that behaves similar). My point is that in _this_ test class (TestJdbcDataSource) the new {{MockDriver}} class is the only "mock" class we explicitly define - all other code in this test uses Mockito based mocks, so it would be easy for someone down the road to look at this class and think "this MockDriver class looks like cruft we can replace with another one line Mockito call" ... basically i'm just suggesting that virtually the same verbage from the {{testRetrieveFromDriverManager}} method should be in {{MockDriver}}'s javadocs. bq. I disagree with that, sorry. As there can be more than one driver installed in the system, ... AUGH! ... yoy are completely correct, i wasn't thinking holisticly about the DriverManager as a whole ... agreed, ignore that suggestion completley. > 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, SOLR-10235.patch, SOLR-10235.patch, > 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