Opened 14 months ago

Last modified 5 days ago

#3561 reopened defect

Test FilterEngineTest, SetRemoveFilterChangeCallback in libadblockplus is failed

Reported by: sergz Assignee:
Priority: P2 Milestone:
Module: Libadblockplus Keywords:
Cc: fhd, asmirnov Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29340602/

Description

Environment

Win 32 and *nix

How to reproduce

Compile and run tests.

Observed behaviour

The output is

...
[ RUN      ] FilterEngineTest.SetRemoveFilterChangeCallback
..\..\test\FilterEngine.cpp(387): error: Value of: timesCalled
  Actual: 3
Expected: 2
..\..\test\FilterEngine.cpp(391): error: Value of: timesCalled
  Actual: 3
Expected: 2
[  FAILED  ] FilterEngineTest.SetRemoveFilterChangeCallback (204 ms)

Expected behaviour

The test should pass.

Additional note

There is a race condition, adding of AdblockPlus::Sleep(40/*msec*/); at the beginning of the test body helps.

Change History (4)

comment:1 Changed 11 months ago by sergz

  • Resolution set to fixed
  • Review URL(s) modified (diff)
  • Status changed from new to closed

comment:2 Changed 4 months ago by sergz

  • Resolution fixed deleted
  • Status changed from closed to reopened

The test fails again, there is still a race condition, however the reason can be different from the previous case.

[ RUN      ] FilterEngineTest.SetRemoveFilterChangeCallback
..\..\test\FilterEngine.cpp(501): error:       Expected: 1
To be equal to: timesCalled
      Which is: 2
..\..\test\FilterEngine.cpp(505): error:       Expected: 1
To be equal to: timesCalled
      Which is: 2

comment:3 Changed 4 months ago by asmirnov

  • Cc Anton added

comment:4 Changed 5 days ago by sergz

  • Cc asmirnov added; Anton removed
Note: See TracTickets for help on using tickets.