Uploaded image for project: 'Fluid Infusion'
  1. Fluid Infusion
  2. FLUID-5497

Priorities of model listeners added via the IoC testing framework have become inverted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 1.9
    • Component/s: Data Binder, Framework
    • Labels:
      None

      Description

      The bug fixes for applying precise model invalidation and the new "source tracking system" merged in https://github.com/fluid-project/infusion/pull/553 for FLUID-5489, FLUID-5490 introduced a serious bug into the system whereby the "mapPriority" function is applied twice to model listener records added via the IoC testing framework. For example, in the following record,
      listenerMaker: "gpii.tests.makeAssertModelChanges",
      makerArgs: ["

      {resourceInputPanel}", "resources.0.src", "{that}.options.testOpts.0.src"],
      spec: {path: "", priority: "last"},
      changeEvent: "{resourceInputPanel}

      .applier.modelChanged"
      the value priority: "last" became mapped to a numeric value, and was then inverted, causing this listener to be notified FIRST rather than last. This causes the test cases to fail in a brutal and perplexing way - firstly the entire test sequence resolves before the second change in the stack (triggered by a manual relay) is applied, and so no changes are picked up in the UI - then when the changes do begin to apply, the user receives an "error expanding material for destroyed component" failure since the entire test fixture has now been cleared away.

        Attachments

          Activity

            People

            Assignee:
            antranig Antranig Basman
            Reporter:
            antranig Antranig Basman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: