Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[core] Notify requests about network reachability in priority order #13721

Merged
merged 1 commit into from
Jan 14, 2019

Conversation

alexshalamov
Copy link
Contributor

@alexshalamov alexshalamov commented Jan 11, 2019

When network status is changed to online, all unqueued requests may be processed in nondeterministic. order (unordered_set). Therefore, low-priority request may be made active, while other are put to priority queue. This introduces flakiness for the unit test.

Fixes: #13371

Copy link
Contributor

@kkaefer kkaefer left a comment

Choose a reason for hiding this comment

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

It looks like this changes the test to not fail anymore, but doesn't fix the underlying issue (= requests are processed in non-deterministic order). Can we instead make the order of the requests more deterministic?

@friedbunny friedbunny added tests Core The cross-platform C++ core, aka mbgl labels Jan 11, 2019
@alexshalamov
Copy link
Contributor Author

@kkaefer I can reproduce the issue quite reliably, for example with filter --gtest_filter=OnlineFileSource.NetworkStatusChange:OnlineFileSource.NetworkStatusChangePreempt:OnlineFileSource.LowHighPriorityRequests

I can draft PR that will process requests according to the priority when connectivity status is changed to online.

@alexshalamov alexshalamov force-pushed the alexshalamov_fix_flaky_onlinefilesource branch from f29aa05 to c0c1c73 Compare January 14, 2019 09:47
@alexshalamov alexshalamov changed the title [core] Fix flaky OnlineFileSource.LowHighPriorityRequests [core] Notify requests about network reachability in priority order Jan 14, 2019
@alexshalamov alexshalamov force-pushed the alexshalamov_fix_flaky_onlinefilesource branch from c0c1c73 to f577e43 Compare January 14, 2019 12:28
@alexshalamov
Copy link
Contributor Author

@kkaefer could you please take a look?

@alexshalamov alexshalamov force-pushed the alexshalamov_fix_flaky_onlinefilesource branch from f577e43 to 4bdfd38 Compare January 14, 2019 14:22
@alexshalamov alexshalamov merged commit ab160ac into master Jan 14, 2019
@alexshalamov alexshalamov deleted the alexshalamov_fix_flaky_onlinefilesource branch January 14, 2019 15:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants