[ 
https://issues.apache.org/jira/browse/PIG-3001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Cheolsoo Park updated PIG-3001:
-------------------------------

    Attachment: PIG-3001.patch

Uploading a patch that makes the test more stable. I made two changes.

- Looking at the commit history, PIG-2971 made ExecutableManager#safeEnvName() 
obsolete. Now the user specifies which properties to be added as env. vars via 
a Pig property, so safeEnvName() is no longer used. I removed it.

- Replaced RandomStringUtils.random() with 
RandomStringUtils.randomAlphanumeric(). RandomStringUtils.random() generates a 
string from the set of all characters, and sometimes the returned string is not 
proper to be used as an env. var. name as shown in this jira.

Testing done:
ant clean test -Dtestcase=TestExecutableManager
                
> TestExecutableManager.testAddJobConfToEnv fails randomly
> --------------------------------------------------------
>
>                 Key: PIG-3001
>                 URL: https://issues.apache.org/jira/browse/PIG-3001
>             Project: Pig
>          Issue Type: Sub-task
>            Reporter: Gianmarco De Francisci Morales
>            Priority: Minor
>         Attachments: PIG-3001.patch
>
>
> The test in the Summary fails intermittently.
> This is due to using a random number generator without seeding it.
> We should avoid stochastic tests.
> Furthermore, the test itself is ill conceived.
> Here the failure summary:
> {code}
> 12/10/23 11:02:48 WARN streaming.ExecutableManager: Property set in 
> pig.streaming.environment not found in Configuration: ⻨ꢏ切歯
> 12/10/23 11:02:48 WARN streaming.ExecutableManager: Property set in 
> pig.streaming.environment not found in Configuration: 狓偝
> 12/10/23 11:02:48 WARN streaming.ExecutableManager: Property set in 
> pig.streaming.environment not found in Configuration: 墣챟㌌̀썬鼹騷
> 12/10/23 11:02:48 WARN streaming.ExecutableManager: Property set in 
> pig.streaming.environment not found in Configuration: 훎滼
> {code}
> {code}
> Error Message:
> There should be no remaining pairs in the included map
> Stacktrace:
> junit.framework.AssertionFailedError: There should be no remaining pairs in 
> the included map
>       at 
> org.apache.pig.impl.streaming.TestExecutableManager.testAddJobConfToEnv(TestExecutableManager.java:84)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to