Skip to content

Fix ExtractEmptyKeywordsByPageId test to expect 204 No Content#3533

Open
dovas-net wants to merge 1 commit into
NationalSecurityAgency:integrationfrom
dovas-net:fix/3523-empty-keywords-test
Open

Fix ExtractEmptyKeywordsByPageId test to expect 204 No Content#3533
dovas-net wants to merge 1 commit into
NationalSecurityAgency:integrationfrom
dovas-net:fix/3523-empty-keywords-test

Conversation

@dovas-net
Copy link
Copy Markdown

@dovas-net dovas-net commented May 2, 2026

Summary

Fixes #3523

The ExtractEmptyKeywordsByPageId web test consistently fails because it expects HTTP 200 with application/xml;charset=UTF-8, but /Query/generateTagCloud correctly returns HTTP 204 No Content when no keywords match (PAGE_ID 10 produces no keywords).

The 204 is intentional server behavior: LookupUUIDUtil.generateTagCloud throws NoResultsException when the merged response is empty, and NoResultsException hardcodes Response.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. LookupWikipediaByPageTitleDNE204 in LookupUUID.test, NoMetricsResults204 in QueryMetrics.test).

Test plan

  • ExtractEmptyKeywordsByPageId passes in the Docker Compose web test suite
  • Other tests in KeywordExtraction.test still pass

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 avgAGB self-requested a review May 5, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker Compose Web Test "ExtractEmptyKeywordsByPageId" Fails

2 participants