hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Lamb <cl...@cloudera.com>
Subject Re: How to build and run my own test code of HDFS
Date Wed, 25 Feb 2015 22:38:54 GMT
On 2/25/2015 5:35 PM, Lipeng Wan wrote:
> Dear all,
> I'm a beginner of HDFS development and trying to write my own test
> code of HDFS. For example, I modified the MiniDFSClusterManager class
> a little bit and try to execute it from command line. When I run "mvn
> test" under the hadoop-hdfs directory, it seems like all the existing
> test code can be executed correctly. I can also use "mvn -Dtest=XXX
> test" to run a specific existing test code. However, I'm not familiar
> with Maven, and I don't know how to let Maven know my own test code
> and execute it. Should I add some information in the pom.xml?

If all you are doing is adding a new unit test, then just go ahead and 
add it. mvn test will find it. Alternatively, you can do

mvn test -Dtest=TestMyUnitTest

and it should execute (assuming you named your unit test TestMyUnitTest).



View raw message