Repository navigation
Fix Firebird development server version parsing - #74
Open
Pavlushechko wants to merge 3 commits into
Open
Pavlushechko wants to merge 3 commits into
Pavlushechko wants to merge 3 commits into
Conversation
MrTeeett
reviewed
Dec 3, 2026
MrTeeett
reviewed
Dec 4, 2026
| for name, entries := range map[string][]byte{ | ||
| "missing count": nil, | ||
| "zero count": {0}, | ||
| "missing entry": {1}, |
Contributor
There was a problem hiding this comment.
With {1}, the test can still pass if the decoder ignores the missing entry, because parsing an empty version also returns an error. I suggest using a count of two followed by a single valid version entry. That way, the test fails if the decoder accepts the incomplete response.
Suggested change
| "missing entry": {1}, | |
| "missing second entry": append([]byte{2, byte(len(version))}, version...), |
Author
There was a problem hiding this comment.
The test now declares two entries and includes one valid version. It fails if the decoder accepts the response with the second entry missing.
Collaborator
|
Please, no generic messages in commits like "fixed bug" or "fixed some after review" like in 4e0e870. Commit message must contain short description why those changes made. |
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.
Fixes #36.
Firebird snapshots can report versions such as
LI-T6.0.0.2459 Firebird 6.0 2f725cf. The previous parser required-V, so connecting to a snapshot could fail while parsing the server version.\wbuild-type character, includingV,T, andX, and optional revision suffixes such as-dev.isc_info_firebird_versionentries and parse the first entry.ServerVersionAPI.Added regression tests for snapshot versions, revision suffixes, and database responses with multiple or malformed entries. Updated the Sweep fixture to match the Service Manager response format.
Verified in WSL against Firebird 6 snapshot
LI-T6.0.0.2526withgo test -p 1 -count=1 ./.... All packages passed.