Repository navigation
[CLIENT-5593] Fix stale error-message substring assertions in string/expression tests - #265
Merged
Merged
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.
reugn/github-action-aerospike defaults server-version to 'latest', unlike the EE jobs which already pin an explicit server-tag. That's exactly what caused this ticket's incident: the CE image moved out from under CI with zero code changes, silently unlocking two previously-dormant tests and making the failure look like a mystery regression instead of an attributable change. Pinned to 8.2.0.0, matching what's actually running today.
This reverts commit df68eb6.
Confirmed with khaf/dmishra: 8.1.3 was discarded during development and never shipped as a real server release; the five features gated on it (supports_string_operations, supports_integer_index, supports_extended_error_detail, supports_server_compiled_ael, supports_query_selection) actually first became available in 8.2.0. Corrected the version_parser.rs guards plus every doc comment and test skip-message across the codebase that stated 8.1.3 as the requirement. Also pinned test-ce and both test-ee-* jobs in build-test.yml to 8.2.0.0 (was 8.1.2.0 for EE, unpinned `latest` for CE) -- confirmed decision: server releases move slowly enough that a manual bump beats an unpinned image silently moving out from under CI (see CLIENT-5593). Verified: full local suite against a live 8.2.0 server, 483 passed, 0 failed, 5 ignored.
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: https://aerospike.atlassian.net/browse/CLIENT-5593
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.
Verified against a live 8.2.0 server: both pass.
Pinned CE and EE to 8.2.0 and corrected the version guard from 8.1.3 to 8.2.0.