Fix ExtractEmptyKeywordsByPageId test to expect 204 No Content#3533
Open
dovas-net wants to merge 1 commit into
Open
Fix ExtractEmptyKeywordsByPageId test to expect 204 No Content#3533dovas-net wants to merge 1 commit into
dovas-net wants to merge 1 commit into
Conversation
The /Query/generateTagCloud endpoint correctly returns HTTP 204 when no keywords match (LookupUUIDUtil throws NoResultsException, which hardcodes Response.Status.NO_CONTENT). The test was incorrectly expecting 200 with application/xml content, causing it to fail consistently. Update the expected response type to "" and status to 204, matching the established convention for 204-expecting tests in the suite (e.g. LookupWikipediaByPageTitleDNE204, NoMetricsResults204). Fixes NationalSecurityAgency#3523
avgAGB
approved these changes
May 4, 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.
Summary
Fixes #3523
The
ExtractEmptyKeywordsByPageIdweb test consistently fails because it expects HTTP 200 withapplication/xml;charset=UTF-8, but/Query/generateTagCloudcorrectly returns HTTP 204 No Content when no keywords match (PAGE_ID 10 produces no keywords).The 204 is intentional server behavior:
LookupUUIDUtil.generateTagCloudthrowsNoResultsExceptionwhen the merged response is empty, andNoResultsExceptionhardcodesResponse.Status.NO_CONTENT.This change updates the test expectations to match the actual (and correct) server behavior, following the established convention used by other 204-expecting tests in the same suite (e.g.
LookupWikipediaByPageTitleDNE204inLookupUUID.test,NoMetricsResults204inQueryMetrics.test).Test plan
ExtractEmptyKeywordsByPageIdpasses in the Docker Compose web test suiteKeywordExtraction.teststill pass