Hi, I implemented this to speed up tests. I know JUnit etc and use them for Apache Jackrabbit / Jackrabbit Oak at my job.
For H2, I think JUnit, especially at that time when I built it, was not a good match. For H2, the same tests are run with various combinations (in-memory, persisted, remote). Even with @Parameterized I'm not sure if performance would be good. > outdated mechanism I don't agree it's "outdated". It's just "different from what you might use for other things". Regards, Thomas On Thu, Mar 6, 2025 at 10:44 AM Paul Hrdina <[email protected]> wrote: > Dear maintainers of H2 database, > > I've been using H2 as a client via Maven JAR artifacts for years - > especially during my seminars at the university where I'm teaching. And I > really love the simplicity, versatility and conformance to SQL standards. > > What a surprise I've experienced, when I cloned the source repo for the > first time and wanted to run the tests in the IDE (IntelliJ IDEA) - from > the package structure in the `src/test/java` I gained false assumption that > there's reasonably rich testing part, and I focused more on > `src/main/java`, where I was looking for good examples of Code Smells for > my other classes (on a reasonably large code base which is not under any > NDA so that I can freely show it during the lecture). However, when I > become curious how much test coverage there is in the project, and ran all > tests in the whole module (using my standard routine), only a single JUnit > test started to run and continued to run for many more minutes... > > I decided to focus more attention to the tests and realized H2 is equipped > with a home-baked infrastructure for organizing and running the tests. That > infrastructure appeared almost 20 years ago, when JUnit 4 was already out > the door. And nowadays (after 20 more years) the tests in this project > still look very much the same - and completely strange for heavy users of > xUnit testing infrastracture family. > > Before investing more into this, I'd like to learn reasons behind so > outdated mechanism for maintaining an extensive test suite (and forcing > individual tests to look so weird - a single test method per class, amounts > of assertions in a single method). > > I'd like to ask anybody with some background information regarding tests > in the H2 DB repo to give me hints why their "status quo" stays unchanged > for so long (and sick from the perspective of even 20-years old xUnit > patterns). > > Thanks a lot, > Paul > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/h2-database/2d04a98c-f35d-4ca2-935d-c308ce6aefe0n%40googlegroups.com > <https://groups.google.com/d/msgid/h2-database/2d04a98c-f35d-4ca2-935d-c308ce6aefe0n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/h2-database/CAKpgiBYwhkOP%3DpFCLsp65OBbSmJdy6FwqsMJHFpWbq6qB1-XOA%40mail.gmail.com.
