FLUID-6742: Race condition in IoC Testing Framework tests exposed by upgrade to Chrome 103

Metadata

Source
FLUID-6742
Type
Bug
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2022-07-01T18:57:20.687-0400
Updated
2024-07-22T10:35:18.135-0400
Versions
  1. 4.1
Fixed Versions
  1. 4.2
Component
  1. IoC Testing Framework

Description

Recent pull requests have been stalling in GitHub's CI, such as https://github.com/fluid-project/infusion/pull/1083 for FLUID-6741, which investigation shows have been stalling in particular on "FLUID-5633 strikes back sequence", a particularly ambitious test fixture which races an onCreate component construction against an IoCSS listener registration.

Given that our old version of QUnit includes an inbuild 13ms delay before the test sequence starts, there is no reason to expect the registration should complete before the construction starts.

Whilst we can revert this to the traditional pattern of firing construction as the first sequence element, we can note that now we have FLUID-6148, issues like FLUID-6541 could now be remedied. We could delay onCreate of the environment based on QUnit's readiness via a modellised resource or so. What we would hope to achieve here is that the first sequence element, if it were passive, could ensure that any binding were in place to be able to observe onCreate. However, if it were active, it would be delayed until strictly after onCreate. This would be a nice "nice to have" but destabilising the existing, and diminishing pool of IoC testing framework users seems unattractive.

Comments

  • Antranig Basman commented 2022-07-01T18:58:30.223-0400

    The sketch of this had

    model: {
            QUnitReady: "{that}.resources.QUnitReady.parsed"
        },
        resources: {
            QUnitReady: {
                promiseFunc: "fluid.identity",
                promiseArgs: "{that}.QUnitReady"
            }
        },
        members: {
            QUnitReady: "@expand:fluid.promise()",
        }
    

    but we would then have to run "runTests" in some workflow function that say, operated immediately after concludeComponentObservation. Could be done now, but messy.