OK, I can see how the directory structure might be at odds w/intellij's view of the world.Yet I feel certain I have been able to run all tests in IJ before.
Just to disconfirm my insanity I tried again building and running all tests in core on branch_9x/main using both intellij and gradle build/test options (both via in intellij). There are a few oddities that happen in intellij that require you to fiddle with the build in odd ways, but I wonder if these will be reproducible or if they maybe happen because there is some bad state: 1. Building branch_9x with intellij builder selected in the gradle settings failed to build the benchmark module due to some modules not being visible to it (e.g. icu). So I "unload module benchmark" effectively skipping building that, and then I am able to build the rest of lucene. YMMV 2. After switching back to main branch, I got a build failure "error: Annotation generator had thrown the exception. javax.annotation.processing.FilerException: Attempt to recreate a file for type org.apache.lucene.benchmark.jmh.jmh_generated.ExpressionsBenchmark_expression_jmhTest". I see there are some generated classes in lucene/benchmark_jmh/src/java/generated, that show up in git status, so I remove that folder and then everything is fine - some cruft left from a previous build? Side note: when running all tests in "intellij" mode you cannot do it by selecting the "core" module - you have to navigate down to the "tests" folder. Also I observed that when running tests in "gradle" mode I no longer observed the slow startup times? Really unsure what that means. Maybe some networking thing? But the main thing I learned is that while running tests using intellij builder mostly works, MemorySegmentIndexInputProvider fails to get loaded and any test using MMapDirectory will fail, regardless of whether I run a single test or a whole suite. This is true on both 9x and main branches and causes 1/3-1/2 of tests to fail in core. At this point I'm reluctant to recommend using the intellij build mode. Maybe it will become viable again if we can figure out how to get MMapDirectory tests to work with it? On Sat, Jun 8, 2024 at 4:06 PM Dawid Weiss <dawid.we...@gmail.com> wrote: > > >> By the way, the >> classpath problems seem to occur with either method (gradle or >> intellij) when running entire suite - I just confused while switching >> back and forth. This is on main, haven't tried 9x recently > > > Some of these headaches are caused by Lucene's folder structure and have been > there forever - resources mixed with source classes. I don't know if you can > make intellij use a folder as a resource and as source directory at the same > time - I don't think it's possible. If so, tests that rely on these resources > will fail. It's been this way since I remember - nothing has changed here. > > There is also a lot of trickery involving modular paths etc. I don't think > it'll be easy to simulate this in Intellij. Then, 99% of test cases will run > just fine from intellij without any special hacks (I think)... > > I'd say - run individual tests from intellij, add a test launching config > redirecting to gradle for the whole suite - it should also be faster this way > since tests will run in parallel between modules. > > D. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org