FLUID-5252: Improve diagnostics from IoC testing framework in the case of an event hang

Metadata

Source
FLUID-5252
Type
Improvement
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2014-01-15T03:53:07.264-0500
Updated
2015-06-26T09:55:47.232-0400
Versions
  1. 1.5
Fixed Versions
  1. 1.9
Component
  1. IoC System

Description

When run in the browser, the IoC testing framework provides a helpful UI (assuming that ProgressiveEnhancement.js is included) dynamically updating as each sequence point in a "sequence" test fixture is reached, which can be helpful in diagnosing at what point an expected event has failed to be received. In general, in an asynchronous framework, a "hang" is the only response where the next fixture element consists of a listener which must be activated in response to some action performed by the previous element, but the event in question never fires.

When performing tests at the console, e.g. for node.js-based tests, this UI is not available, making the cause of failures more obscure. It would be hard to apply a similar dynamic interface to the browser-based one, but one possibility is a form of "dead man's switch" notification. The IoC testing framework could be configured with a timeout parameter, say, defaulting to 2 seconds, which after that interval waiting in vain for a listener element, would log a message identifying the current sequence point to the console. Every time a listener responds, this timeout would be cleared.

Comments