ing-bank / scruid

Scala + Druid: Scruid. A library that allows you to compose queries in Scala, and parse the result back into typesafe classes.
Apache License 2.0
115 stars 29 forks source link

RequestInterceptor not applied when query executed as stream #105

Open redfaithful opened 4 years ago

redfaithful commented 4 years ago

I tried to use BasicAuthenticationExtension when applying the query as stream, and the header is not added to the query.

In BasicAuthenticationSpec, queries are tested to include the header only with the .execute method and not with .streamAs method. Attached a patch with a scenario testing this issue and failing. Test_basic_authentication_with_streaming.txt

redfaithful commented 4 years ago

Adding a fix to this issue, including the modified test. Fix_basic_authentication_with_streaming.txt