jenkinsci / junit-plugin

Allows JUnit-format test results to be published
https://plugins.jenkins.io/junit
MIT License
76 stars 335 forks source link

Publish `H2JUnitTestResultStorage` for conformance to pluggable storage for other plugins to use #340

Open timja opened 2 years ago

timja commented 2 years ago

What feature do you want to see added?

It was copied into realtime junit in https://github.com/jenkinsci/junit-realtime-test-reporter-plugin/pull/36

Class: https://github.com/jenkinsci/junit-realtime-test-reporter-plugin/blob/1af2f977de6a9cff6f085d0a41201b13960e7f5d/src/test/java/org/jenkinsci/plugins/junitrealtimetestreporter/storage/H2JunitTestResultStorage.java

Ideally this would be published in a tests jar.

Upstream changes

No response

dcendents commented 2 years ago

My 2 cents, now that I think about it, is this necessary?

Once #341 is fully implemented, realtime junit should be able to use the junit-sql-storage plugin with the H2 database plugin (or even SQLite) for its unit tests.

I understand the junit plugin cannot have a reference to the junit-sql-storage-plugin (cyclic dependencies), but maybe we should not publish a test Impl when it should be as straight forward to use the real plugin with an embedded file database instead.

timja commented 2 years ago

Yeah I guess not needed assuming junit-sql-storage works with h2.

It's currently tested with Postgres automatically and has been manually tested with MySQL