Repository navigation
Fix stale error-message substring assertions in string/expression tests - #264
Closed
diparthaspike wants to merge 1 commit into
Closed
diparthaspike wants to merge 1 commit into
diparthaspike wants to merge 1 commit into
Conversation
CLIENT-5492 (PR #262) changed Error's Display from enum-style names ("FilteredOut", "BinTypeError") to human prose ("Transaction filtered out", "Bin type error"), but these two tests still checked for the old substrings. Never caught because both tests gate on server >= 8.1.3 (server_supports_string_operations) and no CI server had ever been new enough to actually execute the assertion until Docker Hub's aerospike/aerospike-server:latest moved to 8.2.0.0. Switched both to assert_eq! against err.server_result_code() directly instead of matching Display text, so this can't go stale again. Verified against a live 8.2.0 server: both pass.
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.
Two tests in tests/src/exp_string.rs and tests/src/string.rs checked for old error-message substrings ("FilteredOut", "BinTypeError") that stopped matching once CLIENT-5492 (#262) reworked Error's Display to human prose ("Transaction filtered out", "Bin type error"). Never caught in CI because both tests gate on server >= 8.1.3, and no CI server had ever actually been new enough to run them until Docker Hub's aerospike/aerospike-server:latest moved to 8.2.0.0.
Fixed by asserting on err.server_result_code() directly instead of matching Display text, so this can't go stale again the next time the message wording changes.
Verified against a live 8.2.0 server: both pass.