[jira] [Commented] (SOLR-8184) Negative tests for JDBC Connection String
[ https://issues.apache.org/jira/browse/SOLR-8184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15274065#comment-15274065 ] ASF subversion and git services commented on SOLR-8184: --- Commit 219ddbb998cf0e011c087e7a0629908f40dd0d5d in lucene-solr's branch refs/heads/branch_6x from [~risdenk] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=219ddbb ] SOLR-8184: Negative tests for JDBC Connection String > Negative tests for JDBC Connection String > - > > Key: SOLR-8184 > URL: https://issues.apache.org/jira/browse/SOLR-8184 > Project: Solr > Issue Type: Test > Environment: Trunk >Reporter: Susheel Kumar >Assignee: Kevin Risden >Priority: Minor > Attachments: SOLR-8184.patch, SOLR-8184.patch, SOLR-8184.patch, > SOLR-8184.patch > > > Ticket to track negative tests for JDBC connection string SOLR-7986 -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8184) Negative tests for JDBC Connection String
[ https://issues.apache.org/jira/browse/SOLR-8184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15274064#comment-15274064 ] ASF subversion and git services commented on SOLR-8184: --- Commit 732e7e80c6fcb3d8ec2ecee3908dde88009f82d8 in lucene-solr's branch refs/heads/master from [~risdenk] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=732e7e8 ] SOLR-8184: Negative tests for JDBC Connection String > Negative tests for JDBC Connection String > - > > Key: SOLR-8184 > URL: https://issues.apache.org/jira/browse/SOLR-8184 > Project: Solr > Issue Type: Test > Environment: Trunk >Reporter: Susheel Kumar >Assignee: Kevin Risden >Priority: Minor > Attachments: SOLR-8184.patch, SOLR-8184.patch, SOLR-8184.patch, > SOLR-8184.patch > > > Ticket to track negative tests for JDBC connection string SOLR-7986 -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8184) Negative tests for JDBC Connection String
[ https://issues.apache.org/jira/browse/SOLR-8184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15089330#comment-15089330 ] Jason Gerlowski commented on SOLR-8184: --- My understanding is that a legit connection string starts with: {{jdbc://solr}}. This test has the position of "solr" and "jdbc" swapped (i.e. {{solr:jdbc://}}). So this connection string *will* cause an exception, even before the ZK host is parsed out and a connection is attempted. If you think this isn't clear enough, I'm happy to rename the method name (I kept the name from the initial patch). Or maybe assert on the exception message to make it clear that this isn't zk-related. > Negative tests for JDBC Connection String > - > > Key: SOLR-8184 > URL: https://issues.apache.org/jira/browse/SOLR-8184 > Project: Solr > Issue Type: Test > Environment: Trunk >Reporter: Susheel Kumar >Priority: Minor > Attachments: SOLR-8184.patch, SOLR-8184.patch, SOLR-8184.patch > > > Ticket to track negative tests for JDBC connection string SOLR-7986 -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8184) Negative tests for JDBC Connection String
[ https://issues.apache.org/jira/browse/SOLR-8184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15089348#comment-15089348 ] Kevin Risden commented on SOLR-8184: Yea whats really happening is that the DriverManager can't actually find a driver that supports that url string. The method that is getting tested is Driver#acceptsURL. {code} java.sql.SQLException: No suitable driver found for solr:jdbc://zoo1:9983/foo?collection=collection1 {code} > Negative tests for JDBC Connection String > - > > Key: SOLR-8184 > URL: https://issues.apache.org/jira/browse/SOLR-8184 > Project: Solr > Issue Type: Test > Environment: Trunk >Reporter: Susheel Kumar >Priority: Minor > Attachments: SOLR-8184.patch, SOLR-8184.patch, SOLR-8184.patch > > > Ticket to track negative tests for JDBC connection string SOLR-7986 -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8184) Negative tests for JDBC Connection String
[ https://issues.apache.org/jira/browse/SOLR-8184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15089323#comment-15089323 ] Kevin Risden commented on SOLR-8184: What is this testing for exactly? It looks like the connection string will be valid? A SQLException will be thrown because it can't connect to the cluster though. {quote} + @Test(expected = SQLException.class) + public void testConnectionStringJumbled() throws Exception { +final String sampleZkHost="zoo1:9983/foo"; +DriverManager.getConnection("solr:jdbc://" + sampleZkHost + "?collection=collection1", new Properties()); + } {quote} > Negative tests for JDBC Connection String > - > > Key: SOLR-8184 > URL: https://issues.apache.org/jira/browse/SOLR-8184 > Project: Solr > Issue Type: Test > Environment: Trunk >Reporter: Susheel Kumar >Priority: Minor > Attachments: SOLR-8184.patch, SOLR-8184.patch, SOLR-8184.patch > > > Ticket to track negative tests for JDBC connection string SOLR-7986 -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8184) Negative tests for JDBC Connection String
[ https://issues.apache.org/jira/browse/SOLR-8184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15089329#comment-15089329 ] Kevin Risden commented on SOLR-8184: nvm I see that jdbc and solr are switched now. > Negative tests for JDBC Connection String > - > > Key: SOLR-8184 > URL: https://issues.apache.org/jira/browse/SOLR-8184 > Project: Solr > Issue Type: Test > Environment: Trunk >Reporter: Susheel Kumar >Priority: Minor > Attachments: SOLR-8184.patch, SOLR-8184.patch, SOLR-8184.patch > > > Ticket to track negative tests for JDBC connection string SOLR-7986 -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8184) Negative tests for JDBC Connection String
[ https://issues.apache.org/jira/browse/SOLR-8184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15087540#comment-15087540 ] Kevin Risden commented on SOLR-8184: {quote} 1.) Totally drop the first test (since it already has coverage in JdbcDriverTest), 2.) Move the second test to JdbcDriverTest, 3.) Keep the third test in JdbcTest, but move it into the doTest() method. This allows it to avoid incurring the unnecessary overheard, as Kevin mentioned above. {quote} sounds reasonable to me. > Negative tests for JDBC Connection String > - > > Key: SOLR-8184 > URL: https://issues.apache.org/jira/browse/SOLR-8184 > Project: Solr > Issue Type: Test > Environment: Trunk >Reporter: Susheel Kumar >Priority: Minor > Attachments: SOLR-8184.patch, SOLR-8184.patch > > > Ticket to track negative tests for JDBC connection string SOLR-7986 -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
Re: [jira] [Commented] (SOLR-8184) Negative tests for JDBC Connection String
I agree as well, Jason. Please go ahead to make the changes. Thanks, Susheel On Wed, Jan 6, 2016 at 11:11 PM, Jason Gerlowski (JIRA)wrote: > > [ > https://issues.apache.org/jira/browse/SOLR-8184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15086777#comment-15086777 > ] > > Jason Gerlowski commented on SOLR-8184: > --- > > To follow up on my prior comment, it turns out that the test file Kevin > referred to above (JdbcDriverTest) does involve much less overhead (it runs > in ~1sec on my machine.). Since the overheard on these tests is much > lower, I second Kevin's recommendation that we move everything we can into > JdbcDriverTest . > > There are really 3 tests in question here: > testConnectionStringWithMissingZkHost, testConnectionStringJumbled, and > testConnectionStringWithWrongCollection. The first of these is already > covered by JdbcDriverTest.testNullZkConnectionString. The second doesn't > have a JdbcDriverTest analog, but could easily be moved over to > JdbcDriverTest. The third test case would be more difficult to move, as it > involves checking an error arises after connecting, creating a statement, > etc. There doesn't look like there's an easy way to port this over. > > My suggestion/vote would be: > 1.) Totally drop the first test (since it already has coverage in > JdbcDriverTest), > 2.) Move the second test to JdbcDriverTest, > 3.) Keep the third test in JdbcTest, but move it into the doTest() > method. This allows it to avoid incurring the unnecessary overheard, as > Kevin mentioned above. > > Anyone have thoughts/suggestions/counterarguments? I'm happy to make these > modifications myself if others find them reasonable, but I don't want to > step on any toes. [~susheel2...@gmail.com] pushed the first revision of > this up, so I'll hold off for a few days to see if he has any thoughts. > > Otherwise (assuming people are ok with my proposed plan), I'll go ahead > with this. > > > Negative tests for JDBC Connection String > > - > > > > Key: SOLR-8184 > > URL: https://issues.apache.org/jira/browse/SOLR-8184 > > Project: Solr > > Issue Type: Test > > Environment: Trunk > >Reporter: Susheel Kumar > >Priority: Minor > > Attachments: SOLR-8184.patch, SOLR-8184.patch > > > > > > Ticket to track negative tests for JDBC connection string SOLR-7986 > > > > -- > This message was sent by Atlassian JIRA > (v6.3.4#6332) > > - > To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org > For additional commands, e-mail: dev-h...@lucene.apache.org > >
[jira] [Commented] (SOLR-8184) Negative tests for JDBC Connection String
[ https://issues.apache.org/jira/browse/SOLR-8184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15086777#comment-15086777 ] Jason Gerlowski commented on SOLR-8184: --- To follow up on my prior comment, it turns out that the test file Kevin referred to above (JdbcDriverTest) does involve much less overhead (it runs in ~1sec on my machine.). Since the overheard on these tests is much lower, I second Kevin's recommendation that we move everything we can into JdbcDriverTest . There are really 3 tests in question here: testConnectionStringWithMissingZkHost, testConnectionStringJumbled, and testConnectionStringWithWrongCollection. The first of these is already covered by JdbcDriverTest.testNullZkConnectionString. The second doesn't have a JdbcDriverTest analog, but could easily be moved over to JdbcDriverTest. The third test case would be more difficult to move, as it involves checking an error arises after connecting, creating a statement, etc. There doesn't look like there's an easy way to port this over. My suggestion/vote would be: 1.) Totally drop the first test (since it already has coverage in JdbcDriverTest), 2.) Move the second test to JdbcDriverTest, 3.) Keep the third test in JdbcTest, but move it into the doTest() method. This allows it to avoid incurring the unnecessary overheard, as Kevin mentioned above. Anyone have thoughts/suggestions/counterarguments? I'm happy to make these modifications myself if others find them reasonable, but I don't want to step on any toes. [~susheel2...@gmail.com] pushed the first revision of this up, so I'll hold off for a few days to see if he has any thoughts. Otherwise (assuming people are ok with my proposed plan), I'll go ahead with this. > Negative tests for JDBC Connection String > - > > Key: SOLR-8184 > URL: https://issues.apache.org/jira/browse/SOLR-8184 > Project: Solr > Issue Type: Test > Environment: Trunk >Reporter: Susheel Kumar >Priority: Minor > Attachments: SOLR-8184.patch, SOLR-8184.patch > > > Ticket to track negative tests for JDBC connection string SOLR-7986 -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8184) Negative tests for JDBC Connection String
[ https://issues.apache.org/jira/browse/SOLR-8184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15032092#comment-15032092 ] Kevin Risden commented on SOLR-8184: [~susheel2...@gmail.com] Are the tests that were added here included in SOLR-8179? The way the tests that were added w/ your patch would mean that a whole new Solr cluster would be stood up for each test. In SOLR-8179 I added a new class specifically for testing the driver that doesn't require a Solr cluster to be up and running. > Negative tests for JDBC Connection String > - > > Key: SOLR-8184 > URL: https://issues.apache.org/jira/browse/SOLR-8184 > Project: Solr > Issue Type: Test > Environment: Trunk >Reporter: Susheel Kumar >Priority: Minor > Attachments: SOLR-8184.patch > > > Ticket to track negative tests for JDBC connection string SOLR-7986 -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8184) Negative tests for JDBC Connection String
[ https://issues.apache.org/jira/browse/SOLR-8184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14968377#comment-14968377 ] Susheel Kumar commented on SOLR-8184: - Some observations: The test "testConnectionStringWithMissingZKHost" throws SolrException / TimeOutException than SQLException and similarly the test "testConnectionStringWithWrongCollection" goes thru various retries before it fails. Is that right behavior? > Negative tests for JDBC Connection String > - > > Key: SOLR-8184 > URL: https://issues.apache.org/jira/browse/SOLR-8184 > Project: Solr > Issue Type: Test > Environment: Trunk >Reporter: Susheel Kumar >Priority: Minor > Attachments: SOLR-8184.patch > > > Ticket to track negative tests for JDBC connection string SOLR-7986 -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org