Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix api stream #743

Merged
merged 2 commits into from
Aug 7, 2020
Merged

Fix api stream #743

merged 2 commits into from
Aug 7, 2020

Conversation

jowlee
Copy link
Contributor

@jowlee jowlee commented Aug 7, 2020

Trello Card Link

https://trello.com/c/dZ5hN7kg/1453-api-v1-tracks-trackid-stream-is-broken

Description

Caching a 302 redirect response for Discovery Provider's /v1 api was broken.

Services

Discovery Provider

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration.
Include log analysis if applicable.

  1. Hit any /v1 API endpoint
  2. Hit the same endpoint again within 5 seconds to get the cached response
  3. Hit the /v1/tracks/<track_id>/stream endpoint
  4. Hit the /v1/tracks/<track_id>/stream endpoint again within 5 seconds to get the cached response

Please list the unit test(s) you added to verify your changes.

  1. Unit test to check the the correct transform function was being used and the the cached responses exist in redis before the timeout and do not exist after the timeout.

Copy link
Member

@raymondjacobson raymondjacobson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome test

@raymondjacobson
Copy link
Member

Looks good to me other than the lint error :-)

@piazzatron
Copy link
Contributor

Rad 👍

I feel like in general maybe it's a better practice to break up longer tests like this into multiple smaller tests for maintainability, but I'm fine with this as it is

@jowlee jowlee merged commit 5e7a6aa into master Aug 7, 2020
@jowlee jowlee deleted the jowlee-fix-api-stream branch August 7, 2020 22:05
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.

None yet

4 participants