Re: [hibernate-dev] run a single unit test speed up?

Sanne Grinovero <[email protected]>
Newsgroups gmane.comp.java.hibernate.devel
Message-ID <CAFm4XO0Cc7ghG-KYbOu0JqWyj5tG94nE0Mr9JRkS3OCFQLv82Q@mail.gmail.com>
Hi Jason,

I'm surprised. It's not instantaneous here either, but it doesn't take
minutes - provided you've built the project before and didn't change a
lot of code.

If I run such a test for the first time, possibly after having
switched branches, I'll get test results in ~20 seconds; most of this
is spent recompiling. But if I repeat the same command right away, it
will complete in ~1 second.

What do you see if you repeat the test a second time after having just run it?

Just for reference, a full build runnig all tests on H2 takes 6
minutes on my machine.

Thanks,
Sanne



On Wed, 22 Apr 2020 at 21:59, Jason Pyeron <[email protected]> wrote:
>
> I got it down to BUILD SUCCESSFUL in 2m 32s
> 27 actionable tasks: 5 executed, 22 up-to-date
>
> By using
>
> ./gradlew :hibernate-core:test --tests org.hibernate.test.annotations.cid.CompositeIdFkGeneratedValueIdentityTest
>
>
> Package___________________________      Tests   Duration        Success rate
> org.hibernate.test.annotations.cid      1____   0.586s__        100%
>
> For an approximate 250x slow down compared to the test execution, sigh.
>
> > -----Original Message-----
> > From: [email protected] <[email protected]> On Behalf Of Jason
> > Pyeron
> > Sent: Wednesday, April 22, 2020 4:48 PM
> > To: 'Hibernate Dev' <[email protected]>
> > Subject: [hibernate-dev] run a single unit test???? do I really have to manually put -x for every task
> > I do not want?
> >
> > Does anyone know how to get a single unit test to run without building a battleship too? Tried in
> > eclipse too.
> >
> > ./gradlew test --tests org.hibernate.test.annotations.cid.CompositeIdFkGeneratedValueIdentityTest
> >
> > ... 5 minutes later ...
> >
> > FAILURE: Build failed with an exception.
> >
> > * What went wrong:
> > Execution failed for task ':documentation:test'.
> > > No tests found for given includes:
> > [org.hibernate.test.annotations.cid.CompositeIdFkGeneratedValueIdentityTest](--tests filter)
> >
> > * Try:
> > Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log
> > output. Run with --scan to get full insights.
> >
> > * Get more help at https://help.gradle.org
> >
> > Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
> > Use '--warning-mode all' to show the individual deprecation warnings.
> > See https://docs.gradle.org/4.10.3/userguide/command_line_interface.html#sec:command_line_warnings
> >
> > BUILD FAILED in 4m 38s
> > 36 actionable tasks: 35 executed, 1 up-to-date
> >
> > --
> > Jason Pyeron  | Architect
> > PD Inc        |
> > 10 w 24th St  |
> > Baltimore, MD |
> >
> > .mil: [email protected]
> > .com: [email protected]
> > tel : 202-741-9397
> >
> >
> >
> >
> > _______________________________________________
> > hibernate-dev mailing list
> > [email protected]
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
> _______________________________________________
> hibernate-dev mailing list
> [email protected]
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.