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

NPE in TestHiveCli.java

Log workAgile BoardRank to TopRank to BottomAdd voteVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Test
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Beeline, Test

      Description

      @Before
      public void setup() throws IOException, URISyntaxException {
        System.setProperty("datanucleus.schema.autoCreateAll", "true");
        cli = new HiveCli();
        initFromFile();
        redirectOutputStream();
      }
      

      In setup(), initFromFile() may access err before initialization

       

       

      [ERROR] org.apache.hive.beeline.cli.TestHiveCli.testSetPromptValue  Time elapsed: 1.167 s  <<< ERROR!
      java.lang.NullPointerException
              at org.apache.hive.beeline.cli.TestHiveCli.executeCMD(TestHiveCli.java:249)
              at org.apache.hive.beeline.cli.TestHiveCli.initFromFile(TestHiveCli.java:315)
              at org.apache.hive.beeline.cli.TestHiveCli.setup(TestHiveCli.java:288)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
              at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
              at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
              at org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33)
              at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
              at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
              at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
              at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
              at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
              at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
              at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
      
      

       

       

        Attachments

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

              Dates

              • Created:
                Updated:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 50m
              50m

                Issue deployment