Github user JamesRTaylor commented on a diff in the pull request:

    https://github.com/apache/incubator-phoenix/pull/15#discussion_r10508496
  
    --- Diff: 
phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixDriverTest.java ---
    @@ -0,0 +1,48 @@
    +package org.apache.phoenix.jdbc;
    +
    +import org.apache.phoenix.util.PhoenixRuntime;
    +import org.junit.*;
    +
    +import java.sql.Connection;
    +import java.sql.Driver;
    +import java.sql.DriverManager;
    +import java.sql.SQLException;
    +import java.util.Properties;
    +
    +import static org.junit.Assert.assertEquals;
    +
    +public class PhoenixDriverTest {
    +
    +    @Before
    +    public void registerTestDriver() throws Exception {
    +        DriverManager.registerDriver(new PhoenixTestDriver());
    +    }
    +
    +    @After
    +    public void deRegisterTestDriver() throws Exception {
    +        DriverManager.deregisterDriver(new PhoenixTestDriver());
    --- End diff --
    
    Derive from BaseConnectionlessQueryTest and use getUrl() if you need to get 
the connection url. This base class is for cases where we want to test 
client-side stuff, but not actually connect to an hbase cluster. Note that the 
DriverManager.deregisterDriver needs to use the singleton instance that was 
registered. You can get this through the static protected driver member 
variable. Why do you need to do this, though?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to