Skip to content

Make setting QUERY_CONTEXT_DEFAULT explicit in tests#16010

Merged
LakshSingla merged 1 commit intoapache:masterfrom
kgyrtkirk:test-context-tweak
Mar 5, 2024
Merged

Make setting QUERY_CONTEXT_DEFAULT explicit in tests#16010
LakshSingla merged 1 commit intoapache:masterfrom
kgyrtkirk:test-context-tweak

Conversation

@kgyrtkirk
Copy link
Member

@kgyrtkirk kgyrtkirk commented Feb 29, 2024

  • prioritize the last added matcher in DruidExceptionMatcher
    • it adds quite a few matchers and the most interesting one which checks the messages is at the end; showing the message could give better detail about what went wrong (instead of Person mismatch)
    • this made 2 more tests pass
  • remove smart defaulting to some QUERY_CONTEXT values in case they are not supplied
    • there are tests which do rely on some context values set - especially the ones which use the timestamp
    • it also made it unnecessary to explain in long comments why something is happening
  • add some basic report generator for not-yet-supported annotated things

This PR has:

  • been self-reviewed.
  • test only change

* prioritize the last added matcher in DruidExceptionMatcher
  * it adds quite a few matchers and the most interesting one which checks the messages is at the end; showing the message could give better detail about what went wrong (instead of Person mismatch)
  * this made 2 more tests pass
* remove smart defaulting to some QUERY_CONTEXT values in case they are not supplied
  * there are tests which do rely on some context values set - especially the ones which use the timestamp
  * it also made it unnecessary to explain in long comments why something is happening
* add some basic report generator for not-yet-supported annotated things
@kgyrtkirk kgyrtkirk changed the title Minor test improvements Make setting QUERY_CONTEXT_DEFAULT explicit in tests Feb 29, 2024
@kgyrtkirk kgyrtkirk marked this pull request as ready for review February 29, 2024 17:34
@LakshSingla
Copy link
Contributor

I was surprised that not many tests required the QUERY_CONTEXT_DEFAULT set.

@LakshSingla LakshSingla merged commit e469b7e into apache:master Mar 5, 2024
@adarshsanjeev adarshsanjeev added this to the 30.0.0 milestone May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants