Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
Description
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:
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.
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
Attachments
Issue Links
- is related to
-
HIVE-12685 Remove redundant hive-site.xml under common/src/test/resources/
- Closed