Moodle

Unit tests failing on events testing - caused by handler caching

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.2
  • Fix Version/s: 1.9.3
  • Component/s: Events API, Unit tests
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

Just ran unit tests on 1.9.3 candidate. Can you look at these 7 failures?

Fail: lib/simpletest/testeventslib.php / ? eventslib_test / ? test_events_trigger_failed_instant / ?
this one should fail too: Equal expectation fails because [Integer: 1] differs from [Integer: 0] by 1 at [/moodle/19/lib/simpletest/testeventslib.php line 180]

Fail: lib/simpletest/testeventslib.php / ? eventslib_test / ? test_events_trigger_failed_instant / ?
two events should in queue: Equal expectation fails because [Integer: 2] differs from [String: 1] by 1 at [/moodle/19/lib/simpletest/testeventslib.php line 182]

Fail: lib/simpletest/testeventslib.php / ? eventslib_test / ? test_events_trigger_failed_instant / ?
verify no event dispatched yet: Equal expectation fails because [Integer: 0] differs from [Integer: 1] by 1 at [/moodle/19/lib/simpletest/testeventslib.php line 183]

Fail: lib/simpletest/testeventslib.php / ? eventslib_test / ? test_events_trigger_failed_instant / ?
this one should go to queue directly: Equal expectation fails because [Integer: 1] differs from [Integer: 0] by 1 at [/moodle/19/lib/simpletest/testeventslib.php line 185]

Fail: lib/simpletest/testeventslib.php / ? eventslib_test / ? test_events_trigger_failed_instant / ?
three events should in queue: Equal expectation fails because [Integer: 3] differs from [String: 1] by 2 at [/moodle/19/lib/simpletest/testeventslib.php line 186]

Fail: lib/simpletest/testeventslib.php / ? eventslib_test / ? test_events_trigger_failed_instant / ?
verify previous event was not dispatched: Equal expectation fails because [Integer: 0] differs from [Integer: 2] by 2 at [/moodle/19/lib/simpletest/testeventslib.php line 187]

Fail: lib/simpletest/testeventslib.php / ? eventslib_test / ? test_events_trigger_failed_instant / ?
all events should be dispatched: Equal expectation fails because [Integer: 3] differs from [Integer: 1] by 2 at [/moodle/19/lib/simpletest/testeventslib.php line 188]

Activity

Hide
Petr Škoda (skodak) added a comment -

I have found a problem in the handler caching code, it is not reset after updating status in event trigrerring, this could cause some problems when handler errors out - should be fixed now

thanks for the report

Show
Petr Škoda (skodak) added a comment - I have found a problem in the handler caching code, it is not reset after updating status in event trigrerring, this could cause some problems when handler errors out - should be fixed now thanks for the report
Hide
Nicolas Connault added a comment -

Thanks Petr, all passes now

Show
Nicolas Connault added a comment - Thanks Petr, all passes now

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: