[ https://issues.apache.org/jira/browse/LUCENE-9660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17434058#comment-17434058 ]
Robert Muir commented on LUCENE-9660: ------------------------------------- Yes, thank you [~dweiss]. I understand your argument, but I just don't agree. I've never seen a build system that treats tests this way. In a Makefile, my {{test}} task is always {{.PHONY}} and doesn't have outputs (unlike more basic stuff like compilation). It is more than just random seed and source code files that can cause any of our tests to behave differently across runs. Maybe i upgraded my kernel, or my JVM, or passed different jvm flags (e.g. -Xint), or mounted my filesystem differently, or disabled ipv6, or the system is busier and hence slower, the list goes on and on. So I just happen disagree with the idea that a test task takes inputs and creates outputs. It isn't like compilation. It's a "phony target", aka a recipe that we just want to run when we ask it to: https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html Practically, there's two real use-cases where I've hit this issue: * reproducing a flaky test fail in jenkins. sometimes it takes a couple tries especially multithreaded ones. * (re)running tests with an explicit (arbitrary) seed, doing profiling, trying to keep the testsuite fast. > gradle task cache should not cache --tests > ------------------------------------------ > > Key: LUCENE-9660 > URL: https://issues.apache.org/jira/browse/LUCENE-9660 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build > Reporter: David Smiley > Assignee: Dawid Weiss > Priority: Minor > Fix For: main (9.0) > > Time Spent: 10m > Remaining Estimate: 0h > > I recently ran a specific test at the CLI via gradle to see if a particular > build failure repeats. It includes the {{--tests}} command line option to > specify the test. The test passed. Later I wanted to run it again; I > suspected it might be flakey. Gradle completed in 10 seconds, and I'm > certain it didn't actually run the test. There was no printout and the > build/test-results/test/outputs/... from the test run still had not changed > from previously. > Mike Drob informed me of "gradlew cleanTest" but I'd prefer to not have to > know about that, at least not for the specific case of wanting to execute a > specific test. > CC [~dweiss] -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org