Mixtures of plain async tests and IoC testing framework tests can jam in some situations

Description

As part of the work in implementing 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.

Environment

None

Activity

Show:

Philip Tchernavskij August 10, 2020 at 5:55 PM

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

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

Details

Assignee

Reporter

Components

Priority

Created August 8, 2020 at 12:01 AM
Updated July 18, 2024 at 11:36 AM