Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable test cache when running through gradle

When I tried to run the same test once again:

$ ./gradlew -Dtest.single=KafkaStreamsTest streams:test

> Configure project :
Building project 'core' with Scala version 2.11.11


BUILD SUCCESSFUL in 1s

How do I disable the cache so that gradlew runs the whole test ?

Thanks

like image 224
Ted Avatar asked Mar 07 '26 21:03

Ted


2 Answers

This command would run the test (note cleanTest):

./gradlew cleanTest -Dtest.single=KafkaStreamsTest streams:test
like image 180
Ted Avatar answered Mar 10 '26 14:03

Ted


In Gradle 7.6 you can use option

gradle test --rerun

--rerun causes the task to be re-run even if up-to-date. Similar to --rerun-tasks, but only for a specific task.

like image 29
sobczak.dev Avatar answered Mar 10 '26 15:03

sobczak.dev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!