Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:integrationTest also executes :test #240

Closed
felixscheinost opened this issue Oct 24, 2023 · 0 comments · Fixed by #243
Closed

:integrationTest also executes :test #240

felixscheinost opened this issue Oct 24, 2023 · 0 comments · Fixed by #243
Assignees

Comments

@felixscheinost
Copy link

Steps to reproduce:

  1. Create new project at start.grails.org
  2. Add test class to src/test/groovy
  3. Execute ./gradlew clean :integrationTest --tests com.example.DemoSpec

What I expect:

Only com.example.DemoSpec integration test is executed.

What happens:

:test is executed as well.

$ ./gradlew clean :integrationTest --tests com.example.DemoSpec

> Task :integrationTest

Gradle Test Executor 12 STANDARD_OUT
    16:30:43,354 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
    16:30:43,354 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/Users/fesc/Downloads/demo%202/build/resources/integrationTest/logback.xml]
    16:30:43,354 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
    16:30:43,354 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/Users/fesc/Downloads/demo%202/build/resources/integrationTest/logback.xml]
    16:30:43,354 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/Users/fesc/Downloads/demo%202/build/resources/main/logback.xml]
    16:30:43,382 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
    16:30:43,383 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word clr with class [org.springframework.boot.logging.logback.ColorConverter]
    16:30:43,383 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word wex with class [org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter]
    16:30:43,383 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
    16:30:43,386 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
    16:30:43,388 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
    16:30:43,399 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to ERROR
    16:30:43,399 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
    16:30:43,400 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
    16:30:43,400 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@24855019 - Registering current configuration as safe fallback point


DemoSpec STANDARD_OUT
    Grails application running at http://localhost:49332 in environment: test

DemoSpec > test something PASSED

> Task :test

UnitSpec > test something STANDARD_OUT
    foo

UnitSpec > test something PASSED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 8s
11 actionable tasks: 9 executed, 1 from cache, 1 up-to-date

Example project

https://github.com/felixscheinost/showcase-grails-bug-gradle-integration-test-also-executes-unit-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants