Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-2499

Pig TestGrunt.testShellCommand occasionally fails

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: build
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The following code fails from time to time (with a NPE since fileReader.readLine() returns null) :

                  strCmd = "sh bash -c 'touch TouchedFileInsideGrunt_61 | ls | grep TouchedFileInsideGrunt_61 > fileContainingTouchedFileInsideGruntShell_71'";
                  cmd = new ByteArrayInputStream(strCmd.getBytes());
                  reader = new InputStreamReader(cmd);
                  grunt = new Grunt(new BufferedReader(reader), context);
                  grunt.exec();
                  fileReader = new BufferedReader(new FileReader("fileContainingTouchedFileInsideGruntShell_71"));
                  assertTrue(fileReader.readLine().equals("TouchedFileInsideGrunt_61"));
      

        Attachments

          Activity

            People

            • Assignee:
              tomwhite Tom White
              Reporter:
              tomwhite Tom White
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: