FLUID-6541: Mixtures of plain async tests and IoC testing framework tests can jam in some situations

Metadata

Source
FLUID-6541
Type
Improvement
Priority
Major
Status
Open
Resolution
N/A
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2020-08-07T20:01:11.437-0400
Updated
2024-07-18T07:36:52.477-0400
Versions
N/A
Fixed Versions
N/A
Component
  1. Testing Infrastructure

Description

As part of the work in implementing FLUID-6504 for the Infusion Nexus, it was found that in some racy kind of way, mixing plain jqUnit.asyncTest fixtures with IoC testing framework fixtures could cause a hang. The relevant pull request is https://github.com/fluid-project/infusion-nexus/pull/25/files
Until the fixtures in tests/NexusUtilsTests.js were converted to jqUnit.sync, it was possible for them to cause a hang when run sequentially with bindModelTests. These tests properly should always have been sync since the behaviour they test is synchronous, but on the other hand it should not cause a fault if they expressed as async. Note that QUnit's sequence is to call QUnit.stop() on an async fixture and then to execute it - https://github.com/fluid-project/infusion/blob/master/tests/lib/qunit/js/qunit.js#L195

Anecdotally some odd behaviour has sometimes been received on mixing fixtures in this way but the entire "IoC Testing framework" needs an overhaul in any case to eliminate issues such as FLUID-6397 once we can move fully over to the post FLUID-6148 framework.

Comments

  • Philip Tchernavskij commented 2020-08-10T13:55:55.396-0400

    I have written up a minimal breaking case that is a heavily shaved-down version of the tests that were breaking in the FLUID-6504 work.

    To reproduce, clone and install that branch, and install and run tests using Node 12.14.