Repository navigation
[#1200] Record JAX-RPC RI golden responses for the RPC/encoded endpoints - #1229
Merged
Merged
Conversation
maximthomas
marked this pull request as draft
November 10, 2026 11:21
- GoldenRecorderTest compares the committed golden files with a fresh drive of the RI when -Djaxrpc.golden.root is unset, and its Javadoc gives the -am package re-record command. - GoldenValues.describe names the runtime class of nested collection elements, map keys and values; 114 .args files re-recorded. - The recorder fails an __ok or edge case that came back as a fault. - idsAreUniquePerInterface covers all three core interfaces.
1 of 3 tasks
The RI ends the XML declaration with System.lineSeparator(): its XmlWriter calls BufferedWriter.newLine() after it. On Windows every recorded response therefore differed from the committed one at byte 38, and the windows-latest jobs failed committedRecordingsAreReproduced. The drive now writes LF there in both modes, so the comparison passes on Windows and a recording made there equals one made elsewhere. XML parsers do not report whitespace in the prolog, so clients cannot tell the difference.
maximthomas
marked this pull request as ready for review
November 11, 2026 08:01
vharseko
approved these changes
Nov 12, 2026
vharseko
left a comment
Member
There was a problem hiding this comment.
Reviewed the golden-case catalogue, RI recorder, response comparisons, and Maven configuration. I found no blocking issues. The build checks pass across Linux, macOS, and Windows.
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.
Part of #1200
Problem
Issue #1200 replaces the JAX-RPC RI on the seven RPC/encoded endpoints (
SMSObjectIF,DirectoryManagerIF,EntityObjectIF,AssertionManagerIF,FSAssertionManagerIF,SecurityTokenManagerIF,LibertyManagerIF). The replacement must answer what the RI answers, byte for byte, so the RI's responses are recorded first, while the RI is still here.Changes
GoldenRecorderTest(openam-jaxrpc-schema) drives the generated*_Tieclasses with a proxy target. Per case it produces theSOAPClientrequest, the RI response, the arguments the target received and the HTTP status.-Djaxrpc.golden.root,committedRecordingsAreReproducedcompares the committed files with that drive byte for byte, so CI fails when the case catalogue, the client encoder, the RI or the JDK moves a recording.-Djaxrpc.golden.root=<repo root>,recordsTheRIResponsesrewrites them. CI never sets the property.openam-sharedtest-jar (GoldenCase,GoldenCases,GoldenValues): an__okcase per operation and a fault case per declared exception.CoreGoldenCasesadds edge cases: result runtime classes, nulls, special characters, omitted primitives, undeclared failures..argsfiles name the runtime class of every argument, collection element, map key and map value, so nested types and nulls are recorded too..gitattributesmarks the golden files-text, so Windows CI does not convert their line endings.System.lineSeparator(): itsXmlWritercallsBufferedWriter.newLine()after it, so on Windows it writes CRLF there. The drive writes LF there in both modes, so Windows CI reproduces the committed files and a recording made on Windows equals one made elsewhere. XML parsers do not report whitespace in the prolog, so a client cannot tell the difference.openam-sharedbuilds a test-jar;openam-coreandopenam-jaxrpc-schemause it in test scope.No runtime change: test code, test resources and test-scoped pom entries only.
Tests
GoldenValuesTest,CoreGoldenCasesTest.GoldenRecorderTestwithout the property:Tests run: 2, Failures: 0, Errors: 0, Skipped: 1; the compare test passes and the recorder skips.git statusclean on both golden directories."arg" + positionto"val" + positioninGoldenValues) fails the compare test; markinggetAttributesByteValues1__resultByteArrayValuesas byte-exact fails the status check.-Dline.separator=<CR><LF>, the compare test passes (JDK 26, and JDK 11 withCp1252as the default encoding), and re-recording on JDK 26 writes files identical to the committed ones. Without the LF rule the compare test fails on all 354 responses at byte 38, as bothwindows-latestjobs did.openam-sharedandopenam-coretest suites pass.To re-record (the command is also in the
GoldenRecorderTestJavadoc):-ambuilds the case catalogue from the working tree; without it theopenam-sharedandopenam-coretest-jars come from the local repository and a stale catalogue is recorded.package, nottest, because the reactor then includesbcpkix-shaded, whose relocated classes exist only afterpackage.