You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Tom White (Commented) (JIRA)" <ji...@apache.org> on 2012/01/31 20:42:11 UTC
[jira] [Commented] (PIG-2499) Pig TestGrunt.testShellCommand
occasionally fails
[ https://issues.apache.org/jira/browse/PIG-2499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13197155#comment-13197155 ]
Tom White commented on PIG-2499:
--------------------------------
I wonder if {{touch TouchedFileInsideGrunt_61 | ls}} is causing a race, we should probably change it to {{touch TouchedFileInsideGrunt_61 && ls}} for safety's sake anyway.
PIG-2206 was reporting this test as failing too. I don't think it's Mac specific as I have seen this failure on Linux too.
> Pig TestGrunt.testShellCommand occasionally fails
> -------------------------------------------------
>
> Key: PIG-2499
> URL: https://issues.apache.org/jira/browse/PIG-2499
> Project: Pig
> Issue Type: Bug
> Components: build
> Reporter: Tom White
>
> The following code fails from time to time (with a NPE since {{fileReader.readLine()}} returns null) :
> {noformat}
> 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"));
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira