On 09/02/2022 14:04, Rainer Jung wrote:
Hi all,
I wonder how important it is to be able to run the unit tests for TC
8.5-10.0 with JVM versions 8 or even 7 (TC 8.5).
The unconditional addition of unit test jvmargs "--add-opens=..." in
2b6e19e971a980e38bcd30f05c554d9b798666c0 (TC 10, backported) means, we
can no longer run the tests with Java 8 or even 7.
If I remove those jvmargs from build.xml, I run into a second problem
when testing TC 8.5 with Java 7. In
014f4746176c7f27cda7c04b2c6036a539c385ff EasyMock was updated from 3.x
to 4.x, which needs Java 8 to run. Several tests fail with
UnsupportedClassVersionError in a few EasyMock classes.
I can work around all of these myself for running the tests here, but I
wonder, what kind of setup for testing we want to support out-of-the box.
Note that by reintroducing the previous compatibility trick for jvmargs
(TC 8.5, 9 and 10) and using the old EasyMock branch for TC 8.5 we could
still build and test with Java 11, but would also allow testing on the
other target Java versions we support.
WDYT?
I've been thinking about this since I read this yesterday.
I like that the move to Java 11 allowed us to reduce the differences
between the build scripts.
So the decision is: Is the benefit of being able to test with older Java
versions worth the differences this would re-introduce?
We don't test the JreCompat code so there aren't any Java version
specific tests. So what do we gain by testing on Java 7 / Java 8? I can
think of a few things:
- that we really have coded to the correct Java version
- that the code runs as expected on that Java version
Both of those things are more testing Java than testing Tomcat but I can
see that there is some benefit - especially if one is concerned about
the possibility of the code behaving differently on Java 7/8 compared to
Java 11.
I'm not concerned about that but neither am I too concerned about the
re-introduction of a few differences. I guess I am -0 overall provided
that any change does not impact the existing CI systems.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org