сегодня перешел с Micronaut 2.0.0.M3 на его RC1. После этого Gradle больше не выполняет тестовые задания, воспроизводимо.
Вывод выполняется M3:
$ cat gradle.properties
micronautVersion=2.0.0.M3
$ ./gradlew clean build
> Configure project :
Executed by Gradle 6.5
> Task :compileJava
Note: Creating bean classes for 4 type elements
> Task :compileTestGroovy
[...]
> Task :test
[...]
BUILD SUCCESSFUL in 25s
14 actionable tasks: 14 executed
$ ls build/test-results/test/
binary
TEST-server.endpoint.ContributorControllerTest.xml
TEST-server.endpoint.PersonControllerTest.xml
С RC1:
$ cat gradle.properties
micronautVersion=2.0.0.RC1
$ ./gradlew clean build
> Configure project :
Executed by Gradle 6.5
> Task :compileJava
Note: Creating bean classes for 4 type elements
[...]
BUILD SUCCESSFUL in 14s
14 actionable tasks: 14 executed
$ ls build/test-results/test/
binary
$ ls -s build/test-results/test/binary/
0 output.bin
4 output.bin.idx
0 results.bin
Нет XML файлов с тестом создаются результаты; выходные файлы двоичного теста пусты. Действительно, очень странно. Есть идеи, что здесь пошло не так?
Кристиан
Дополнение к ответу на комментарий от @ saw303: Сначала я снова запустил clean build
:
$ cat gradle.properties
micronautVersion=2.0.0.RC1
$ ./gradlew clean build
> Configure project :
Executed by Gradle 6.5
- using Java 11.0.7
- using Groovy 2.5.11
> Task :compileJava
Note: Creating bean classes for 4 type elements
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 12s
14 actionable tasks: 14 executed
Теперь давайте попробуем это с задачей test
:
$ ./gradlew test
> Configure project :
Executed by Gradle 6.5
- using Java 11.0.7
- using Groovy 2.5.11
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 658ms
5 actionable tasks: 5 up-to-date
Очень короткое время выполнения, поэтому никаких тестов не выполняется!
$ ls build/test-results/test/
binary
Работает clean test
:
$ ./gradlew clean test
> Configure project :
Executed by Gradle 6.5
- using Java 11.0.7
- using Groovy 2.5.11
> Task :compileJava
Note: Creating bean classes for 4 type elements
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 5s
6 actionable tasks: 6 executed
Тот же результат, тесты не выполнялись:
$ ls build/test-results/test/
binary