Hi Alex,

You have the right command for running individual tests.  Most tests don't
use MiniOozie or LocalOozie; they just start the Services directly (that's
probably something we should be more consistent about).  The MiniMRCluster
is a little trickier: we start up one MiniMRCluster per maven Module and
reuse it for all tests within that module (this saves on overhead of
stopping/starting Hadoop for every test).  Some code in XTestCase takes
care of this.

That's odd that you're getting a ConnectionRefused Exception like that.  It
sounds like maybe the MiniMRCluster isn't starting up correctly or
something.  You could try changing the log level of Hadoop classes to maybe
get more details on failures there?  Another thing you could try is going
through the test with a debugger and making sure that Hadoop is running in
the test (this is easiest to do by running the test from an IDE rather than
from the CLI).

- Robert




On Tue, Mar 24, 2015 at 4:23 PM, Alex Bain <[email protected]>
wrote:

> Hello,
>
> I'm new to Oozie and am working on implementing it at LinkedIn. We have
> version 4.1.0 with a couple of cherry-picked patches and a few unit tests
> are failing:
>
> Failed tests:
>   testCoordLogStreaming(org.apache.oozie.TestCoordinatorEngineStreamLog)
>
> testActionKillCommandDate(org.apache.oozie.command.coord.TestCoordActionsKillXCommand):
> expected:<RUNNING> but was:<KILLED>
>   testProtoConfStorage(org.apache.oozie.command.wf.TestSubmitXCommand):
> expected:<3> but was:<2>
>
> testRequeueOnException(org.apache.oozie.command.coord.TestCoordPushDependencyCheckXCommand)
>
> How do I run individual unit tests? I am trying to run them with "mvn test
> -Phadoop-2 -Dtest=TestCoordinatorEngineStreamLog". This runs the specified
> test, but I get an error:
>
> Tests in error:
>   testCoordLogStreaming(org.apache.oozie.TestCoordinatorEngineStreamLog):
> Call From abain-ld/127.0.0.1 to abain-ld.linkedin.biz:59441 failed on
> connection exception: java.net.ConnectException: Connection refused; For
> more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
>
> The test seems to be trying to run without starting mini-cluster first (or
> mini-oozie, I'm not sure which the unit tests use); thus, the connection
> request is refused. On the other hand "mvn test -Phadoop-2" runs fine
> (except for the fact that the unit test fails). I've got Java 1.6.0.27 and
> Maven 3.2.3. We're running Hadoop 2.3.0, which is why I'm passing
> -Phadoop-2.
>
> Thanks,
> Alex
>

Reply via email to