Mohit Sabharwal created HIVE-12670:
--------------------------------------
Summary: Fix tests failing due to invalid ConnectionDriverName
Key: HIVE-12670
URL: https://issues.apache.org/jira/browse/HIVE-12670
Project: Hive
Issue Type: Bug
Reporter: Mohit Sabharwal
Assignee: Mohit Sabharwal
Some unit tests fail when run outside the ptest environment (i.e. when run
individually on the local box like mvn test -Dtest=TestSessionHooks) with the
following error:
{code}
Caused by: org.datanucleus.exceptions.NucleusException: Attempt to invoke the
"BONECP" plugin to create a ConnectionPool gave an error : The specified
datastore driver ("hive-site.xml") was not found in the CLASSPATH. Please check
your CLASSPATH specification, and the name of the driver.
{code}
This is because to support TestHiveConf, we override
{{javax.jdo.option.ConnectionDriverName}} in test hive-site file
(common/src/test/resources/hive-site.xml). However, this override gets applied
for all tests. The overriden value is invalid, which causes other tests that
attempt to initialize CliService to fail.
Instead, we should use a property exclusively used for testing like
{{hive.test.dummystats.aggregator}} so that overriding it does not affect other
tests.
Not sure why these tests pass in ptest, presumably because some other test that
comes before overrides {{javax.jdo.option.ConnectionDriverName}} to a sensible
value.
Tests failing:
TestSessionHooks
TestPlainSaslHelper
TestSessionGlobalInitFile
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)