Skip to content

Limit external Tomcat & Derby tests to startup verification#7252

Draft
samyoon20 wants to merge 8 commits into
adoptium:masterfrom
samyoon20:startup-only-tomcat
Draft

Limit external Tomcat & Derby tests to startup verification#7252
samyoon20 wants to merge 8 commits into
adoptium:masterfrom
samyoon20:startup-only-tomcat

Conversation

@samyoon20

@samyoon20 samyoon20 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements startup-only verification for two external tests (Tomcat and Derby). This addresses the roadmap item listed in external/README.md — "Startup-only testing (application startup, but not full runs of app functional testing)" — and tracks issue #7243.

Changes

'external/tomcat/' - server-style startup verification

  • test.sh: Replaces ant test (full upstream Tomcat test suite) with a start/curl/stop sequence.
  • Builds Tomcat from source with ant, starts the server via catalina.sh start, polls http://localhost:8080/ until it responds, then shuts down. A trap cleanup EXIT ensures the servers always stopped. Exits 0 on success, 1 on timeout.
  • test.properties: Adds curl to generic_packages (required for the HTTP readiness check).
    playlist.xml: Keeps tomcat_test at extended level, disabled. Remove disables block to reenable

'external/derby/' — tool-style startup verification

  • test.sh: Retains the full build sequence (ant clobber, ant all, ant buildjars) The startup signal is java -jar derbyrun.jar sysinfo — Derby's own JVM diagnostic tool, which exercises class loading and runtime reflection.
  • playlist.xml: Adds derby_startup_test at extended level. derby_test_junit_all is at extended level, disabled

Reason

The full upstream test suites test the applications themselves, not the JDK. A failure in a Tomcat or Derby unit test is almost certainly an application-level issue, not a JDK defect. What Adoptium needs to verify is: can this JDK launch this application without crashing? A startup check that's much faster than running entire test suite

This is the first "attempt/implementation" of the startup-only pattern listed in 'external/README.md' as planned improvement

Phase 2 -> extending to the other tests that follow similar patterns

The tool-style pattern extends directly to:

  • JaCoCo — mvn install -DskipTests then java -javaagent:org.jacoco.agent.jar -version to verify the agent attaches
  • Kafka — remove ./gradlew test; verify the built JAR loads cleanly
  • Zookeeper — mvn package -DskipTests then verify the built JAR

The server-style pattern extends directly to:

  • WildFly — start standalone.sh, curl management port 9990, stop
  • Elasticsearch — ./gradlew assemble already exists in the script; start the node, curl port 9200, stop

Parts assisted by IBM Bob

@samyoon20 samyoon20 force-pushed the startup-only-tomcat branch from 92d9d1e to cd554fe Compare July 8, 2026 14:47
@samyoon20 samyoon20 changed the title Limit external Tomcat test to startup verification Limit external Tomcat & Derby tests to startup verification Jul 8, 2026
@samyoon20

samyoon20 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@smlambert Hi! When you have time, could I get a review of the direction I'm heading with the test approach I have for tomcat and derby tests? I have two tests that I used as our standard example that if idea is good, we could apply directly to the other related external tests that are listed above. I used disable but so if we were to run the full suite, we would have to remove the disables and also have to add ant test back into test.sh

https://ci.adoptium.net/job/Grinder/17568/
https://ci.adoptium.net/job/Grinder/17569/

tomcat_startup_test:
The Adoptium JDK compiles tomcat source files
The Adoptium JDK starts the Tomcat JVM process — no startup crash, no missing class
The Adoptium JDK's networking stack handles an incoming HTTP request
curl localhost:8080 returns HTTP 200 → exit 0 → tomcat_startup_test_0_PASSED

derby_startup_test:
The Adoptium JDK compiles Derby source with ant — no compiler crash
The Adoptium JDK runs java -jar derbyrun.jar sysinfo
sysinfo exits 0 → derby_startup_test_0_PASSED

@samyoon20 samyoon20 force-pushed the startup-only-tomcat branch 2 times, most recently from d7e82f1 to 4f7fb22 Compare July 8, 2026 19:32
Replace full junit-all test suite with startup-only verification using
Derby's built-in sysinfo tool. The sysinfo command exercises JVM launch,
Derby class loading, and runtime reflection without running Derby's own
application-level unit tests.

Also fix pre-existing bash syntax bug: 'export var value' (without =)
does not assign the variable in bash; corrected to 'export var=value'.

- external/derby/test.sh: remove ant junit-all; fix export syntax; run
  java -jar derbyrun.jar sysinfo as the startup signal
- external/derby/playlist.xml: add derby_startup_test at extended level;
  demote derby_test_junit_all to special level (on-demand only)
@samyoon20 samyoon20 force-pushed the startup-only-tomcat branch from 4f7fb22 to d86d990 Compare July 8, 2026 19:48
Comment thread external/derby/test.sh Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants