Add `-DfailIfNoTests=false` to your maven command and then it should work.

Cheers,
Till

On Tue, Oct 29, 2019 at 6:51 AM Jark Wu <imj...@gmail.com> wrote:

> Usually, I use the following commands to execute single test and it works
> well.
>
> ```
> $ mvn clean install -DskipTests
> # go to the moudle where the test is located
> $ cd flink-connectors/flink-hbase
> $ mvn test -Dtest=org.apache.flink.addons.hbase.HBaseConnectorITCase
> -Dcheckstyle.skip=true
> ```
>
> Hope it helps!
>
> Best,
> Jark
>
>
> On Tue, 29 Oct 2019 at 11:12, Zhenghua Gao <doc...@gmail.com> wrote:
>
> > Actually it's not a Flink problem.
> > For single module project, you can run "mvn -Dtest=YOUR_TEST test" to
> run a
> > single test.
> >
> > For multiple modules project, you can use "-pl sub-module" to specify the
> > module which your test belongs to( mvn -Dtest=YOUR_TEST -pl YOUR_MODULE
> > test),
> > OR just CD to your module directory and run "mvn -Dtest=YOUR_TEST test"
> >
> > *Best Regards,*
> > *Zhenghua Gao*
> >
> >
> > On Tue, Oct 29, 2019 at 10:19 AM 朱国梁 <zhuguolian...@163.com> wrote:
> >
> > >
> > > Hi community! I have a problem that I cannot solve by google.
> > >
> > >
> > > I am trying to specify a test to run using maven.
> > >
> > >
> > > mvn clean test  -Dtest=DistributedCacheTest
> > >
> > >
> > > The result says that:
> > > [ERROR] Failed to execute goal
> > > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test
> (default-test)
> > > on project force-shading: No tests were executed!  (Set
> > > -DfailIfNoTests=false to ignore this error.) -> [Help 1]
> > >
> > >
> > >
> > >
> > >
> > > --
> > >
> > > -------------------
> > >  Best
> > >  zgl
> > > -------------------
> > >
> > >
> > >
> > >
> >
>

Reply via email to