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

RTN17с as a part of 0.9 #504

Merged
merged 5 commits into from
Sep 28, 2016
Merged

RTN17с as a part of 0.9 #504

merged 5 commits into from
Sep 28, 2016

Conversation

EvgenyKarkan
Copy link
Contributor

Please review and merge if everything looks good.

@mattheworiordan
Copy link
Member

I was not aware that RTN17c changed. Are you sure there are not already existing tests for this?

@EvgenyKarkan
Copy link
Contributor Author

EvgenyKarkan commented Sep 20, 2016

Yes, RTN17c test exists, but it tests default fallback hosts.

0.9 has a difference from 0.8:

See RSC15a for details on how custom fallback hosts are specified and used

Ok, RSC15a diffs are:

If an array of custom fallback hosts are provided in ClientOptions#fallbackHosts, then they will be used instead.
If an empty array of fallback hosts is provided, then fallback host functionality is disabled

That's why I added test for custom fallback hosts.
Am I wrong here @mattheworiordan?

@mattheworiordan
Copy link
Member

Ok, fine, but it does feel like we're perhaps testing all the permutations when in reality testing if custom fallback hosts are used does not need to be tested with every other permutation of ClientOptions because we should be reasonably confident that the logic to inject custom fallback hosts is in one place and thus applies globally.

@EvgenyKarkan
Copy link
Contributor Author

EvgenyKarkan commented Sep 21, 2016

@mattheworiordan please let me try to describe what I think on this...

Current PR is based on RTN17b where I've added an ability for ARTRealtime object to use custom fallback hosts, also in RTN17b PR I've added test to cover or an array of ClientOptions#fallbackHosts is provided requirement.

Well, here I'm trying to cover 2 cases with my tests:

  • retry custom fallback hosts in random order after checkin if an internet connection is available (my test based on existing default fallback hosts test),
  • check if fallback hosts feature disabled if an empty array is provided, I did such test for ARTRest, but because we are on ARTRealtime page now, so I decided to add it for ARTRealtime too.

So in my understanding this PR has at least 2 reasons to live, but I could be wrong.

I guess you want me to combine current logic and tests with RTN17b PR and close this PR?
Could you give me a hint in which way should I move forward here please?

@mattheworiordan
Copy link
Member

retry custom fallback hosts in random order after checkin if an internet connection is available (my test based on existing default fallback hosts test),

Fine, but this seems overkill when really we should know that setting the fallback host options simply updated the defaults used by the client library and does not result in an entirely new codepath. Whether the default fallback hosts or custom fallback hosts are used, it should not affect anything other than which hosts are used.

check if fallback hosts feature disabled if an empty array is provided, I did such test for ARTRest, but because we are on ARTRealtime page now, so I decided to add it for ARTRealtime too.

Ok, fine, that makes sense, a quick test for that is good.

So in my understanding this PR has at least 2 reasons to live, but I could be wrong.

Perhaps, but I would argue the first point is overkill. Leave it and merge if existing already though, no need to do more work if it adds test coverage.

@tcard tcard changed the base branch from RTN17b to master September 21, 2016 15:11
@tcard
Copy link
Contributor

tcard commented Sep 21, 2016

@EvgenyKarkan I've changed the base of the pull request to master. Please do that going forward.

@ricardopereira
Copy link
Contributor

Rebased and tests are passing.

@ricardopereira ricardopereira merged commit f7215a0 into master Sep 28, 2016
@ricardopereira ricardopereira deleted the RTN17c branch September 28, 2016 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants