Skip to content

feat(datafile manager): Check network reachability before downloading datafile#264

Closed
jaeopt wants to merge 11 commits intomasterfrom
jae/reach
Closed

feat(datafile manager): Check network reachability before downloading datafile#264
jaeopt wants to merge 11 commits intomasterfrom
jae/reach

Conversation

@jaeopt
Copy link
Contributor

@jaeopt jaeopt commented Sep 11, 2019

  • On asynchronous init, SDK checks if network is up. If not, it returns cached datafile immediately.
  • Added more test cases for datafile download exception cases (200,304,400,500, network down)

@coveralls
Copy link

coveralls commented Sep 11, 2019

Coverage Status

Coverage decreased (-0.004%) to 95.484% when pulling 80f1b80 on jae/reach into 4d26821 on master.

func fetchDatafileBackground(resourceTimeout: Double? = nil, completion: ((OptimizelyResult<Data>) -> Void)? = nil) {

datafileHandler.downloadDatafile(sdkKey: self.sdkKey, resourceTimeoutInterval: resourceTimeout) { result in
let processDownloadResult = { (result: OptimizelyResult<Data?>) in
Copy link
Contributor

Choose a reason for hiding this comment

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

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Refactored for reachability support but decided to move the check to other part.

@jaeopt jaeopt closed this Sep 26, 2019
@jaeopt jaeopt reopened this Sep 26, 2019
@jaeopt jaeopt closed this Sep 27, 2019
@jaeopt jaeopt reopened this Sep 27, 2019
@jaeopt jaeopt closed this Oct 7, 2019
@jaeopt jaeopt reopened this Oct 7, 2019
@jaeopt jaeopt closed this Oct 7, 2019
@jaeopt jaeopt reopened this Oct 7, 2019
@jaeopt jaeopt closed this Jan 9, 2020
@jaeopt
Copy link
Contributor Author

jaeopt commented Jan 9, 2020

This is closed for now. We’ll have a chance to review about the feature in general and its implementation (OASIS-5038)

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.

3 participants