You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beam.apache.org by Chaoran Yu <yu...@gmail.com> on 2016/08/16 03:10:31 UTC

Dev environment set up

Hi folks,

   I have a question about setting up an IDE to develop for Beam. I use
IntelliJ but ran into the following issue:
   All tests passed in command line by running Maven build. But when I
tried to run TextIOTest in IntelliJ for example, a whole bunch of tests
failed with the following error:

java.lang.IllegalArgumentException: Cannot call #run(Pipeline) on an
instance of CrashingRunner. CrashingRunner should only be used as the
default to construct a Pipeline using TestPipeline, and cannot execute
Pipelines. Instead, specify a PipelineRunner by providing PipelineOptions
in the system property 'beamTestPipelineOptions'.

Looks like Intellij is having configuration problems. Is anybody using
Intellij or Eclipse and is there anything I need to do to configure it?

Thank you,
Chaoran

Re: Dev environment set up

Posted by Chaoran Yu <yu...@gmail.com>.
Thank you so much Dan and Gaurav! Really appreciate it!
Now I'm able to configure Intellij to run tests successfully!

Chaoran


On Tue, Aug 16, 2016 at 8:37 PM, Dan Halperin <dh...@google.com.invalid>
wrote:

> There is a hack that I've been using in IntelliJ, since that Maven config
> does not seem to being picked up correctly:
>
> If you go to Edit Configurations > Default > JUnit
>
> then you can set it to "Use classpath of module direct-runner" (the
> -DbeamUseDummyRunner=false may or may not also be necessary).
>
> Dan
>
>
>
> On Tue, Aug 16, 2016 at 11:29 AM, Gaurav Gupta <ga...@gmail.com>
> wrote:
>
>> Chaoran,
>>
>> Tests annotated with @Category(NeedsRunner.class) are ignored when you run
>> tests using maven because sdks/java/core/pom.xml is configured to do so.
>> <excludedGroups>
>>   org.apache.beam.sdk.testing.NeedsRunner
>> </excludedGroups>
>>
>> But when you run it from IDE these tests are not ignored and these tests
>> fail.
>>
>> HTH.
>>
>> Gaurav
>>
>> On Mon, Aug 15, 2016 at 8:10 PM, Chaoran Yu <yu...@gmail.com>
>> wrote:
>>
>> > Hi folks,
>> >
>> >    I have a question about setting up an IDE to develop for Beam. I use
>> > IntelliJ but ran into the following issue:
>> >    All tests passed in command line by running Maven build. But when I
>> > tried to run TextIOTest in IntelliJ for example, a whole bunch of tests
>> > failed with the following error:
>> >
>> > java.lang.IllegalArgumentException: Cannot call #run(Pipeline) on an
>> > instance of CrashingRunner. CrashingRunner should only be used as the
>> > default to construct a Pipeline using TestPipeline, and cannot execute
>> > Pipelines. Instead, specify a PipelineRunner by providing
>> PipelineOptions
>> > in the system property 'beamTestPipelineOptions'.
>> >
>> > Looks like Intellij is having configuration problems. Is anybody using
>> > Intellij or Eclipse and is there anything I need to do to configure it?
>> >
>> > Thank you,
>> > Chaoran
>> >
>>
>

Re: Dev environment set up

Posted by Dan Halperin <dh...@google.com.INVALID>.
There is a hack that I've been using in IntelliJ, since that Maven config
does not seem to being picked up correctly:

If you go to Edit Configurations > Default > JUnit

then you can set it to "Use classpath of module direct-runner" (the
-DbeamUseDummyRunner=false may or may not also be necessary).

Dan



On Tue, Aug 16, 2016 at 11:29 AM, Gaurav Gupta <ga...@gmail.com>
wrote:

> Chaoran,
>
> Tests annotated with @Category(NeedsRunner.class) are ignored when you run
> tests using maven because sdks/java/core/pom.xml is configured to do so.
> <excludedGroups>
>   org.apache.beam.sdk.testing.NeedsRunner
> </excludedGroups>
>
> But when you run it from IDE these tests are not ignored and these tests
> fail.
>
> HTH.
>
> Gaurav
>
> On Mon, Aug 15, 2016 at 8:10 PM, Chaoran Yu <yu...@gmail.com>
> wrote:
>
> > Hi folks,
> >
> >    I have a question about setting up an IDE to develop for Beam. I use
> > IntelliJ but ran into the following issue:
> >    All tests passed in command line by running Maven build. But when I
> > tried to run TextIOTest in IntelliJ for example, a whole bunch of tests
> > failed with the following error:
> >
> > java.lang.IllegalArgumentException: Cannot call #run(Pipeline) on an
> > instance of CrashingRunner. CrashingRunner should only be used as the
> > default to construct a Pipeline using TestPipeline, and cannot execute
> > Pipelines. Instead, specify a PipelineRunner by providing PipelineOptions
> > in the system property 'beamTestPipelineOptions'.
> >
> > Looks like Intellij is having configuration problems. Is anybody using
> > Intellij or Eclipse and is there anything I need to do to configure it?
> >
> > Thank you,
> > Chaoran
> >
>

Re: Dev environment set up

Posted by Gaurav Gupta <ga...@gmail.com>.
Chaoran,

Tests annotated with @Category(NeedsRunner.class) are ignored when you run
tests using maven because sdks/java/core/pom.xml is configured to do so.
<excludedGroups>
  org.apache.beam.sdk.testing.NeedsRunner
</excludedGroups>

But when you run it from IDE these tests are not ignored and these tests
fail.

HTH.

Gaurav

On Mon, Aug 15, 2016 at 8:10 PM, Chaoran Yu <yu...@gmail.com> wrote:

> Hi folks,
>
>    I have a question about setting up an IDE to develop for Beam. I use
> IntelliJ but ran into the following issue:
>    All tests passed in command line by running Maven build. But when I
> tried to run TextIOTest in IntelliJ for example, a whole bunch of tests
> failed with the following error:
>
> java.lang.IllegalArgumentException: Cannot call #run(Pipeline) on an
> instance of CrashingRunner. CrashingRunner should only be used as the
> default to construct a Pipeline using TestPipeline, and cannot execute
> Pipelines. Instead, specify a PipelineRunner by providing PipelineOptions
> in the system property 'beamTestPipelineOptions'.
>
> Looks like Intellij is having configuration problems. Is anybody using
> Intellij or Eclipse and is there anything I need to do to configure it?
>
> Thank you,
> Chaoran
>