accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-2378) Fix use of LOGNAME in functional tests under MR
Date Wed, 19 Feb 2014 14:38:22 GMT

    [ https://issues.apache.org/jira/browse/ACCUMULO-2378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13905494#comment-13905494
] 

ASF subversion and git services commented on ACCUMULO-2378:
-----------------------------------------------------------

Commit 389831727a8f6ab2fda98f279a5cba442081ca69 in accumulo's branch refs/heads/1.4.5-SNAPSHOT
from [~bhavanki]
[ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=3898317 ]

ACCUMULO-2378 Replace LOGNAME usage in TestUtils.py with getpass

When running functional tests under MapReduce, the LOGNAME environment variable is
not available. This change switches TestUtils.py to use getpass.getuser(), which
looks for a variety of environment variables to locate the current user, and which
works more reliably.


> Fix use of LOGNAME in functional tests under MR
> -----------------------------------------------
>
>                 Key: ACCUMULO-2378
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2378
>             Project: Accumulo
>          Issue Type: Sub-task
>          Components: test
>    Affects Versions: 1.4.4, 1.5.0
>            Reporter: Bill Havanki
>            Assignee: Bill Havanki
>              Labels: mapreduce, test
>
> When running a functional test under MR:
> {noformat}
> 2014-02-18 12:13:48,296 INFO org.apache.accumulo.test.functional.RunTests: More:   File
"test/system/auto/run.py", line 30, in <module>
>     from TestUtils import ACCUMULO_HOME, ACCUMULO_DIR, COBERTURA_HOME, findCoberturaJar
>   File "/usr/lib/accumulo/test/system/auto/TestUtils.py", line 45, in <module>
>     ACCUMULO_DIR = "/user/" + os.getenv('LOGNAME') + "/accumulo-" + ID
> TypeError: cannot concatenate 'str' and 'NoneType' objects
> {noformat}
> Originally noted by [~jfield]:
> bq. The cause of the bug is that the os.getenv('LOGNAME') function doesn't work because
LOGNAME isn't defined for the shell the mapreduce job runs as (probably because either there
isn't a parent bash shell or because that shell is non-interactive).
> Error occurs under 1.4.4 and 1.5.0.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message