You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Eric Charles <er...@u-mangate.com> on 2011/06/13 09:19:51 UTC

Common project tests in eclipe

Hi,

I've imported the hadoop common trunk in eclipse (.classpath and 
.project created via ant eclipse).

ant test build fine (0 failures).

When I run the junit tests from eclipse (right-click on test folder, 
"Run as test"), there are many failures...

Is there some env (-D...) to give when running from eclipse.
I could hack the ant scripts, but someone here may know the answer :)

Many tks for your help,
- Eric

Re: Common project tests in eclipe

Posted by Eric Charles <er...@u-mangate.com>.
Hi Harsh,

Tks for your quick reply, and sorry to be so late.

http://search-hadoop.com/m/gLWelrO8Mc helped me to find the Launch 
configuration for hadoop-hdfs and hadoop-mapreduce, but there are no 
such Launch config for hadoop-common.

Never mind, I just replaced :hdfs with :common and got [1].

My test success % has made an impressive jump, but I still have a few 
failures for example:
junit.framework.AssertionFailedError: -expunge failed expected:<0> but 
was:<1>
	at org.apache.hadoop.fs.TestTrash.trashShell(TestTrash.java:328)
	at org.apache.hadoop.fs.TestTrash.trashShell(TestTrash.java:102)
	at org.apache.hadoop.fs.TestTrash.testTrash(TestTrash.java:447)


About the needed environment variables to run the tests:

1.- Should the Launch configs be documented on 
http://wiki.apache.org/hadoop/EclipseEnvironment ?

2.- should Launch config be created for hadoop-common project ?

2.- The tests depend heavily on env variables. I wonder how to handle 
this with the upcoming maven structure 
(https://issues.apache.org/jira/browse/HADOOP-6671). Should we forsee 
during the test setUp() some default values, a bit like if we would 
generalize https://issues.apache.org/jira/browse/HADOOP-5916 
(Standardize fall-back value of test.build.data for testing directories) 
to all needed env.

Maybe this is already a know topic?
Tks.

[1] -Xms256m -Xmx512m 
-Dtest.build.data=${workspace_loc:common}/build/test 
-Dtest.cache.data=${workspace_loc:common}/build/test/cache 
-Dtest.debug.data=${workspace_loc:common}/build/test/debug 
-Dhadoop.log.dir=${workspace_loc:common}/build/test/log 
-Dtest.src.dir=${workspace_loc:common}/build/test/src 
-Dtest.build.extraconf=${workspace_loc:common}/build/test/extraconf 
-Dhadoop.policy.file=hadoop-policy.xml

On 13/06/11 11:57, Harsh J wrote:
> Eric,
>
> Is the problem reported as something like "webapps not found on
> CLASSPATH"? I see this on mapreduce and hdfs projects at times, but
> common tests usually run fine out of the box for me.
>
> If it is indeed that, this conversation may help solve/provide an
> answer: http://search-hadoop.com/m/gLWelrO8Mc
>
> On Mon, Jun 13, 2011 at 12:49 PM, Eric Charles
> <er...@u-mangate.com>  wrote:
>> Hi,
>>
>> I've imported the hadoop common trunk in eclipse (.classpath and .project
>> created via ant eclipse).
>>
>> ant test build fine (0 failures).
>>
>> When I run the junit tests from eclipse (right-click on test folder, "Run as
>> test"), there are many failures...
>>
>> Is there some env (-D...) to give when running from eclipse.
>> I could hack the ant scripts, but someone here may know the answer :)
>>
>> Many tks for your help,
>> - Eric
>>
>
>
>

-- 
Eric

Re: Common project tests in eclipe

Posted by Harsh J <ha...@cloudera.com>.
Eric,

Is the problem reported as something like "webapps not found on
CLASSPATH"? I see this on mapreduce and hdfs projects at times, but
common tests usually run fine out of the box for me.

If it is indeed that, this conversation may help solve/provide an
answer: http://search-hadoop.com/m/gLWelrO8Mc

On Mon, Jun 13, 2011 at 12:49 PM, Eric Charles
<er...@u-mangate.com> wrote:
> Hi,
>
> I've imported the hadoop common trunk in eclipse (.classpath and .project
> created via ant eclipse).
>
> ant test build fine (0 failures).
>
> When I run the junit tests from eclipse (right-click on test folder, "Run as
> test"), there are many failures...
>
> Is there some env (-D...) to give when running from eclipse.
> I could hack the ant scripts, but someone here may know the answer :)
>
> Many tks for your help,
> - Eric
>



-- 
Harsh J