You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Anthony Roach <An...@marklogic.com> on 2018/04/16 21:50:08 UTC

Unit test for database Put processor

We are writing a PutMarkLogic processor to ingest flowfiles into a MarkLogic database.  Looking at the PutMongo test, it appears that a running instance of MongoDB is expected.  Attempting to run with one ends in failure.  Can we make the same assumption for tests we include into the suite?

Thanks...
___________________________________
Anthony Roach
Product Manager
MarkLogic Corporation
Desk: +1 650 287 2587
Mobile: +1 415 368 6460
www.marklogic.com<https://exchange.marklogic.com/owa/redir.aspx?C=2xvxxIRdFrhaKKSB3ci9GbM0QJCBS5YGss9e9ahFqmgMx1QfDTTUCA..&URL=http%3a%2f%2fwww.marklogic.com%2f>
[MLSoMeSignature]<http://www.marklogic.com/social/>


Re: Unit test for database Put processor

Posted by Mike Thomsen <mi...@gmail.com>.
Anthony,

Sorry, forgot to answer your last question. The best thing you can do,
especially since MarkLogic doesn't have a convenient Docker image
published, is to do both unit and integration tests. A test starting or
ending with Test is a unit test and one ending with IT is an integration
test with the way Maven is configured here. The integration tests will not
run unless you do *mvn integration-test -Pintegration-tests*.

Thanks,

Mike

On Mon, Apr 16, 2018 at 6:00 PM Mike Thomsen <mi...@gmail.com> wrote:

> The PutMongo tests fail because the Mongo processors haven't been fully
> migrated to the new method of declaring EL support. With that said, the
> Mongo tests aren't almost entirely integration tests, not unit tests
> because Mongo is kinda painful to mock.
>
> On Mon, Apr 16, 2018 at 5:50 PM Anthony Roach <An...@marklogic.com>
> wrote:
>
>> We are writing a PutMarkLogic processor to ingest flowfiles into a
>> MarkLogic database.  Looking at the PutMongo test, it appears that a
>> running instance of MongoDB is expected.  Attempting to run with one ends
>> in failure.  Can we make the same assumption for tests we include into the
>> suite?
>>
>>
>>
>> Thanks…
>>
>> ___________________________________
>>
>> Anthony Roach
>>
>> Product Manager
>> MarkLogic Corporation
>>
>> Desk: +1 650 287 2587 <(650)%20287-2587>
>>
>> Mobile: +1 415 368 6460 <(415)%20368-6460>
>> www.marklogic.com
>> <https://exchange.marklogic.com/owa/redir.aspx?C=2xvxxIRdFrhaKKSB3ci9GbM0QJCBS5YGss9e9ahFqmgMx1QfDTTUCA..&URL=http%3a%2f%2fwww.marklogic.com%2f>
>>
>> [image: MLSoMeSignature] <http://www.marklogic.com/social/>
>>
>>
>>
>

Re: Unit test for database Put processor

Posted by Mike Thomsen <mi...@gmail.com>.
The PutMongo tests fail because the Mongo processors haven't been fully
migrated to the new method of declaring EL support. With that said, the
Mongo tests aren't almost entirely integration tests, not unit tests
because Mongo is kinda painful to mock.

On Mon, Apr 16, 2018 at 5:50 PM Anthony Roach <An...@marklogic.com>
wrote:

> We are writing a PutMarkLogic processor to ingest flowfiles into a
> MarkLogic database.  Looking at the PutMongo test, it appears that a
> running instance of MongoDB is expected.  Attempting to run with one ends
> in failure.  Can we make the same assumption for tests we include into the
> suite?
>
>
>
> Thanks…
>
> ___________________________________
>
> Anthony Roach
>
> Product Manager
> MarkLogic Corporation
>
> Desk: +1 650 287 2587 <(650)%20287-2587>
>
> Mobile: +1 415 368 6460 <(415)%20368-6460>
> www.marklogic.com
> <https://exchange.marklogic.com/owa/redir.aspx?C=2xvxxIRdFrhaKKSB3ci9GbM0QJCBS5YGss9e9ahFqmgMx1QfDTTUCA..&URL=http%3a%2f%2fwww.marklogic.com%2f>
>
> [image: MLSoMeSignature] <http://www.marklogic.com/social/>
>
>
>