Metadata
- Source
- FLUID-5659
- Type
- Bug
- Priority
- Major
- Status
- Closed
- Resolution
- Fixed
- Assignee
- Antranig Basman
- Reporter
- Antranig Basman
- Created
2015-04-28T12:28:29.212-0400 - Updated
2015-08-20T15:59:10.315-0400 - Versions
- N/A
- Fixed Versions
-
- 1.9
- Component
-
- Data Binder
Description
A placeholder for a currently uncharacterised failure in model relay. The test failure results in the language panel in first-discovery - relay rules are so:
modelRelay: [{
target: "langIndex",
singleTransform: {
type: "fluid.transforms.indexOf",
array: "{that}.options.controlValues.lang",
value: "{that}.model.lang",
offset: 1
}
}, {
target: "firstLangSelected",
singleTransform: {
type: "fluid.transforms.binaryOp",
left: "{that}.model.langIndex",
operator: "===",
right: 1
}
}, {
target: "lastLangSelected",
singleTransform: {
type: "fluid.transforms.binaryOp",
left: "{that}.model.langIndex",
operator: "===",
right: "{that}.options.controlValues.lang.length"
}
}],
attached to "gpii.firstDiscovery.panel.lang"
the binaryOp relays do not trigger at all in the case we reset the language index back to 1 after setting it to 6.
Comments
-
Antranig Basman commented
2015-04-28T12:41:14.666-0400 Failing config is being tracked at https://github.com/amb26/first-discovery/tree/FLUID-5659
-
Antranig Basman commented
2015-04-29T11:35:24.786-0400 This issue has now been characterised - it consists of yet more rubbish caused by the faulty "relayCount" system which was responsible for FLUID-5303 and FLUID-5293 amongst others. Firstly, the issue is caused by these being shared across transactions - bizarrely, by policy, for no good reason. Secondly, the failure was caused by having a model rich in relay rules which was being tested by several back-to-back transactions resulting from a long fixture in the IoC testing framework:
sequence: [{
func: "{lang}.refreshView"
}, {
listener: "gpii.tests.langTester.verifyRendering",
priority: "last",
event: "{lang}.events.afterRender"
}, {
listener: "gpii.tests.langTester.verifyButtonTopsReady",
args: ["{lang}"],
priority: "last",
event: "{lang}.events.onButtonTopsReady"
}, {
jQueryTrigger: "click",
element: "{lang}.dom.next"
}, {
listener: "gpii.tests.langTester.verifyLangModel",
args: ["{lang}", "sv"],
spec: {path: "lang", priority: "last"},
changeEvent: "{lang}.applier.modelChanged"
}, {
func: "{lang}.refreshView"
}, {
listener: "gpii.tests.langTester.verifyButtonStates",
args: ["{lang}", "sv", false, true],
priority: "last",
event: "{lang}.events.afterRender"
}, {
jQueryTrigger: "click",
element: "{lang}.dom.prev"
}, {
listener: "gpii.tests.langTester.verifyLangModel",
args: ["{lang}", "ne"],
spec: {path: "lang", priority: "last"},
changeEvent: "{lang}.applier.modelChanged"
}, {
func: "{lang}.refreshView"
}, {
listener: "gpii.tests.langTester.verifyButtonStates",
args: ["{lang}", "ne", false, false],
priority: "last",
event: "{lang}.events.afterRender"
}, {
func: "gpii.tests.debugLang",
args: "{lang}"
}, {
func: "{lang}.applier.change",
args: ["lang", "en"]
}, {
listener: "gpii.tests.langTester.verifyLangModel",
args: ["{lang}", "en"],
spec: {path: "lang", priority: "last"},
changeEvent: "{lang}.applier.modelChanged"
}, {
func: "gpii.tests.debugLang",
args: "{lang}"
}, {
func: "{lang}.refreshView"
}, {
listener: "gpii.tests.langTester.verifyButtonStates",
args: ["{lang}", "en", true, false],
priority: "last",
event: "{lang}.events.afterRender"
}]
}]Each listener to applier.modelChanged ends up triggering the following fixture during the endgame of the previous transaction - and given this entire sequence actually resolves synchronously, they are accumulated 3 deep by the end of the sequence. Unfortunately, the logic introduced for FLUID-5293 for clearing the relay counts only executes after all listeners have been notified, by which time the relay counts have been completely saturated.
-
Justin Obara commented
2015-04-30T09:37:28.983-0400 Merged pull request ( https://github.com/fluid-project/infusion/pull/597 ) into the project repo at c0c17164e10e46ac498af9d758c0cfcb93dac7d5