Repository navigation
Fix native JBCS extraction and CI test flakiness - #14
Merged
jbliznak merged 16 commits intoJul 23, 2026
Merged
Conversation
Java's ZipFile does not handle Unix symlinks — it extracts them as tiny regular files containing the symlink target path. This broke httpd startup on RHEL with "libaprutil-1.so.0: file too short". Falls back to Java extraction only when unzip is not installed.
The JBCS ZIP ships with a pre-generated httpd.conf whose ServerRoot points to the original build path, which does not exist on CI nodes.
The JBCS httpd.conf ships with User/Group set to "apache" which does not exist on CI nodes. These directives are unnecessary when httpd runs as a non-root user.
The JBCS httpd.conf points DocumentRoot to /var/www/html which does not exist on CI nodes. The testsuite does not serve static files so DocumentRoot is not needed.
The JBCS distribution ships various conf.d/ files (ssl.conf, mod_cluster-native.conf, etc.) that reference system paths not present on CI nodes. Clean them all out instead of removing them one by one.
Member
Isn't this caused by the missing |
Contributor
Author
|
@jajik Good point, thank you! I will switch this to Draft and investigate. |
honza-kasik
marked this pull request as draft
July 20, 2026 10:30
Use a .done marker file instead of httpd.conf existence to detect whether postinstall has already run. Search for the postinstall script across multiple locations (root, etc/, walk up to 3 levels) to handle varying JBCS layouts. Downgrade non-zero exit codes to warnings since non-root execution is expected to fail partially. Remove ServerRoot and DocumentRoot patching from patchHttpdConf() as these are now handled by the postinstall script itself.
Responses where httpd returns its own error page (e.g. 503) instead of
proxying to a backend produced null worker names that were silently
added to the distribution map. This caused waitForWorkerRegistration
to falsely pass when {null, worker1} satisfied the hasSize(2) check,
allowing tests to proceed before all workers had actually registered.
Count null-worker responses as failures in testLoadDistribution and
filter null keys in waitForWorkerRegistration so it keeps polling
until the expected number of real workers appear.
The testLoadDistributionAcrossWorkers test was asserting the ratio immediately after confirming both workers exist, but a newly registered worker starts with initial-load=0 and only gets a real load factor after the next status-interval tick (10s). Move the ratio check into the await loop so it polls until distribution actually stabilizes.
Same fix as testLoadDistributionAcrossWorkers: poll until distribution stabilizes instead of measuring immediately after worker registration, when initial-load=0 causes skewed routing.
The 500MB memory allocation request can stall beyond the default 10s read timeout under CI load due to GC pressure. Use a dedicated HEAVY_REQUEST timeout constant (30s) for this call.
A single HTTP 200 only confirms one worker has the ws-echo context; the WebSocket upgrade can be routed to the other worker that hasn't registered yet, causing the connection to fail.
…lients With initial-load=0, a worker may not get a JVM route appended to JSESSIONID until the balancer receives a STATUS message, causing extractWorkerFromSessionId to return "unknown".
…loop After stopping worker2 in a previous cycle, Infinispan state transfer can cause worker1 to return HTTP 200 without a JSESSIONID cookie. Replace the manual retry loop with Awaitility polling, bounded by STATE_TRANSFER_REQUEST timeout.
waitForWorkerRegistration parses worker names from response bodies, which the ws-echo static HTML page does not contain. Use awaitContextRegistered to query the balancer directly instead.
30s still insufficient for 500MB allocation under CI GC pressure.
Even after waitForWorkerRegistration confirms both workers serve traffic, a transient initial-load=0 window can produce a route-less JSESSIONID cookie, causing assignedWorker to be "unknown".
honza-kasik
marked this pull request as ready for review
July 22, 2026 11:40
martinchoma
approved these changes
Jul 23, 2026
martinchoma
left a comment
There was a problem hiding this comment.
Approving per good CI results and no obvious problem in changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test flakiness fixes
With these fixes, passrate is now
99.84%99.87% across 134 platform combinations.