Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29424663: Issue 5198 - workaround for race condition in tests (Closed)

Created:
April 28, 2017, 10:32 a.m. by sergei
Modified:
April 28, 2017, 2:38 p.m.
Reviewers:
hub
CC:
Felix Dahlke
Base URL:
https://github.com/adblockplus/libadblockplus.git
Visibility:
Public.

Description

It's merely a workaround to have tests running until it's properly solved. The issue currently is that adding of a subscription triggers timeouts with zero seconds timeout. As the result when the test finishes JsEngine is not referenced anymore but the callback for zero timeout is being still executed and tries to destroy JsEngine and we hit the throwing of an exception from destructor (std::thread::join does it to avoid dead-lock). The workaround gives some time to finish these timer callbacks. So far, having such additional sleep only in that place is enough to run tests. # this change is also required for https://issues.adblockplus.org/ticket/5182

Patch Set 1 #

Total comments: 2

Patch Set 2 : add comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -0 lines) Patch
M test/FilterEngine.cpp View 1 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 4
sergei
April 28, 2017, 10:38 a.m. (2017-04-28 10:38:48 UTC) #1
hub
LGTM with a 'nit https://codereview.adblockplus.org/29424663/diff/29424664/test/FilterEngine.cpp File test/FilterEngine.cpp (right): https://codereview.adblockplus.org/29424663/diff/29424664/test/FilterEngine.cpp#newcode60 test/FilterEngine.cpp:60: void TearDown() override I would ...
April 28, 2017, 1:07 p.m. (2017-04-28 13:07:23 UTC) #2
sergei
https://codereview.adblockplus.org/29424663/diff/29424664/test/FilterEngine.cpp File test/FilterEngine.cpp (right): https://codereview.adblockplus.org/29424663/diff/29424664/test/FilterEngine.cpp#newcode60 test/FilterEngine.cpp:60: void TearDown() override On 2017/04/28 13:07:23, hub wrote: > ...
April 28, 2017, 1:14 p.m. (2017-04-28 13:14:33 UTC) #3
hub
April 28, 2017, 2:24 p.m. (2017-04-28 14:24:33 UTC) #4
LGTM

Powered by Google App Engine
This is Rietveld