Skip to content

Conversation

@Tarun-kishore
Copy link
Contributor

@Tarun-kishore Tarun-kishore commented Jul 7, 2025

Description

This PR fixes a failure in the RollupInterceptorIT.test roll up search integration test.

The test was asserting the exact error message returned when no suitable rollup job was found for a query. However, the list of missing fields in the error message is unordered, resulting in non-deterministic string output ("missing field timestamp" appearing before or after "missing field RateCodeID").
image

This caused the test to fail intermittently due to strict string comparison.

This PR also fixes some ktlint errors by running ktlint --format


Fix

  • Updated the test assertion to validate the presence of expected substrings individually using assertTrue() instead of relying on exact ordering via assertEquals().
  • Ensures test stability while preserving correctness.

Testing

  • Ran RollupInterceptorIT locally to confirm consistent pass.
  • Verified that error message contains all expected fields:
    • missing field RateCodeID
    • missing field timestamp
    • missing sum aggregation on total_amount

image


Related Issues

Resolves #1441

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@Tarun-kishore Tarun-kishore changed the title Fix lint errors and Integration test Fix Integration test and lint errors Jul 7, 2025
@Tarun-kishore Tarun-kishore force-pushed the bug/fix-lint-error-and-integration-test branch from 3d18e9a to 7069477 Compare July 7, 2025 11:09
@cwperks
Copy link
Member

cwperks commented Jul 10, 2025

Thank you @Tarun-kishore ! I hit the same failure in #1438 and included a fix in there, but its a much larger PR.

@bowenlan-amzn bowenlan-amzn merged commit f5aaf80 into opensearch-project:main Jul 11, 2025
18 of 19 checks passed
@Tarun-kishore Tarun-kishore deleted the bug/fix-lint-error-and-integration-test branch July 11, 2025 00:46
Tarun-kishore added a commit to Tarun-kishore/index-management that referenced this pull request Jul 15, 2025
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.

[BUG] RollupInterceptorIT integration test is failing

3 participants