Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-12670

Fix tests failing due to invalid ConnectionDriverName

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mohitsabharwal Mohit Sabharwal Assign to me
            mohitsabharwal Mohit Sabharwal
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment