Make GoldenFileTest self-contained in CI#1
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix GoldenFileTest dependency on external FIX XML files
Make GoldenFileTest self-contained in CI
Jun 3, 2026
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.
GoldenFileTestdepended on FIX42/FIX44 dictionaries from a siblingquickfixj-messagescheckout, which does not exist in CI. This updates the test to use in-repo fixtures so the Maven workflow can run from a single repository checkout.Test inputs
src/test/resources/dictionaries/:FIX42.xmlFIX44.xmlGoldenFileTest
../quickfixj-messages/...Documentation
Original prompt
Create the smallest, most robust fix for the failing CI job in repository
quickfix-j/quickfixj-codegenerator.Context:
.github/workflows/maven.ymlin run26900115940, job79349879432.src/test/java/org/quickfixj/codegenerator/GoldenFileTest.java.../quickfixj-messages/quickfixj-messages-fix42/src/main/resources/FIX42.xml../quickfixj-messages/quickfixj-messages-fix44/src/main/resources/FIX44.xmlFileNotFoundExceptionduring test execution.Requested solution:
GoldenFileTestto read the dictionary files from this repository instead of from a sibling checkout.Expected changes:
src/test/resources/dictionaries/FIX42.xmlsrc/test/resources/dictionaries/FIX44.xmlsrc/test/java/org/quickfixj/codegenerator/GoldenFileTest.javaso the dictionary file paths point to those new test resource files.Please open a pull request with the fix.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.
Assistant: The failure is caused by
GoldenFileTestdepending on FIX XML dictionaries that are not present in this repository checkout.Root cause
The test hard-codes dictionary paths outside the repo:
src/test/java/org/quickfixj/codegenerator/GoldenFileTest.javalines 44–47It expects:
../quickfixj-messages/quickfixj-messages-fix42/src/main/resources/FIX42.xml../quickfixj-messages/quickfixj-messages-fix44/src/main/resources/FIX44.xmlBut the workflow only checks out this repo and runs Maven:
.github/workflows/maven.ymllines 21–29So on CI, those files do not exist, producing the
FileNotFoundExceptionseen in the failing job.Best fix
Make the test self-contained by using dictionaries stored in this repository’s test resources instead of referencing a sibling checkout.
Suggested code change
Update
GoldenFileTestto load FIX42/FIX44 XML fromsrc/test/resources:Then add these files to the repo:
src/test/resources/dictionaries/FIX42.xmlsrc/test/resources/dictionaries/FIX44.xmlThis is the most reliable solution because it removes the CI/environment dependency entirely.
Recommended defensive improvement
Fail fast with a clear assertion before generation instead of allowing a deep
FileNotFoundExceptionfrom parsing:Why this is the right fix
MessageCodeGeneratorparses the specification file directly viabuilder.parse(task.getSpecification()):src/main/java/org/quickfixj/codegenerator/MessageCodeGenerator.javalines 239–248So the failure is not in generation logic; it is purely test setup and repository layout.
Alternative if you do not want to vendor the XML files
Change the workflow to also check out the
quickfixj-messagesrepository into../quickfixj-messages, but this is less desirable because it makes tests dependent on multi-repo CI layout. The cleaner solution is to keep test inputs in this repo.Minimal patch shape
If you wan...
This pull request was created from Copilot chat.