Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 425695

Summary: Test failures in pluginRegistry
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ken_walker, Silenio_Quarti
Version: 5.0   
Target Milestone: 5.0 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
fix if just calling init() is valid none

Description Mark Macdonald CLA 2014-01-14 13:32:04 EST
There are 7 test failures in the pluginRegistry

> [Test Run] - <top> start test.js:290
>  [failed] test init/stop empty registry (0.005s)
>   TypeError: Cannot read property 'parentNode' of undefined
>  Stack Trace:
> TypeError: Cannot read property 'parentNode' of undefined
>     at http://localhost:8080/orion/pluginregistry.js:1217:39
>     at notify (http://localhost:8080/orion/Deferred.js:110:46)
>     at run (http://localhost:8080/orion/Deferred.js:29:13) test.js:323
>  [passed] test start/stop empty registry (0.001s) test.js:323
>  [failed] test install/uninstall plugin (0.003s)
>   TypeError: Cannot call method 'appendChild' of undefined
>  Stack Trace:
> TypeError: Cannot call method 'appendChild' of undefined
>     at Object.PluginRegistry.internalRegistry.connect (http://localhost:8080/orion/pluginregistry.js:927:37)
>     at Object.PluginRegistry.internalRegistry.loadManifest (http://localhost:8080/orion/pluginregistry.js:981:48)
>     at PluginRegistry.installPlugin (http://localhost:8080/orion/pluginregistry.js:1267:44)
>     at tests.test install/uninstall plugin (http://localhost:8080/js-tests/pluginregistry/testcase.js:52:38)
>     at Array.<anonymous> (http://localhost:8080/orion/test.js:115:23)
>     at _next (http://localhost:8080/orion/test.js:31:35)
>     at notify (http://localhost:8080/orion/Deferred.js:110:46)
>     at run (http://localhost:8080/orion/Deferred.js:29:13) test.js:323
>  [passed] test install/uninstall initial plugin (0.005s) test.js:323
>  [passed] test start/stop plugin (0.065s) test.js:323
>  [passed] test start/stop initial plugin (0.056s) test.js:323
>  [failed] test install same plugin URL (0.001s)
>   TypeError: Cannot call method 'appendChild' of undefined
>  Stack Trace:
> TypeError: Cannot call method 'appendChild' of undefined
>     at Object.PluginRegistry.internalRegistry.connect (http://localhost:8080/orion/pluginregistry.js:927:37)
>     at Object.PluginRegistry.internalRegistry.loadManifest (http://localhost:8080/orion/pluginregistry.js:981:48)
>     at PluginRegistry.installPlugin (http://localhost:8080/orion/pluginregistry.js:1267:44)
>     at tests.test install same plugin URL (http://localhost:8080/js-tests/pluginregistry/testcase.js:157:39)
>     at Array.<anonymous> (http://localhost:8080/orion/test.js:115:23)
>     at _next (http://localhost:8080/orion/test.js:31:35)
>     at notify (http://localhost:8080/orion/Deferred.js:110:46)
>     at run (http://localhost:8080/orion/Deferred.js:29:13) test.js:323
>  [passed] test reload installed plugin (0.121s) test.js:323
>  [passed] test plugin service call (0.088s) test.js:323
>  [passed] test plugin service call promise (0.096s) test.js:323
>  [passed] test plugin service call promise cancel (0.054s) test.js:323
>  [passed] test plugin event (0.103s) test.js:323
>  [passed] test pluginregistry events started (0.085s) test.js:323
>  [failed] test 404 plugin (0.002s)
>   TypeError: Cannot call method 'appendChild' of undefined
>  Stack Trace:
> TypeError: Cannot call method 'appendChild' of undefined
>     at Object.PluginRegistry.internalRegistry.connect (http://localhost:8080/orion/pluginregistry.js:927:37)
>     at Object.PluginRegistry.internalRegistry.loadManifest (http://localhost:8080/orion/pluginregistry.js:981:48)
>     at PluginRegistry.installPlugin (http://localhost:8080/orion/pluginregistry.js:1267:44)
>     at tests.test 404 plugin (http://localhost:8080/js-tests/pluginregistry/testcase.js:372:38)
>     at Array.<anonymous> (http://localhost:8080/orion/test.js:115:23)
>     at _next (http://localhost:8080/orion/test.js:31:35)
>     at notify (http://localhost:8080/orion/Deferred.js:110:46)
>     at run (http://localhost:8080/orion/Deferred.js:29:13) test.js:323
>  [failed] test iframe sandbox (0.001s)
>   TypeError: Cannot call method 'appendChild' of undefined
>  Stack Trace:
> TypeError: Cannot call method 'appendChild' of undefined
>     at Object.PluginRegistry.internalRegistry.connect (http://localhost:8080/orion/pluginregistry.js:927:37)
>     at Object.PluginRegistry.internalRegistry.loadManifest (http://localhost:8080/orion/pluginregistry.js:981:48)
>     at PluginRegistry.installPlugin (http://localhost:8080/orion/pluginregistry.js:1267:44)
>     at tests.test iframe sandbox (http://localhost:8080/js-tests/pluginregistry/testcase.js:392:42)
>     at Array.<anonymous> (http://localhost:8080/orion/test.js:115:23)
>     at _next (http://localhost:8080/orion/test.js:31:35)
>     at notify (http://localhost:8080/orion/Deferred.js:110:46)
>     at run (http://localhost:8080/orion/Deferred.js:29:13) test.js:323
>  [passed] test __plugin__ property (0.079s) test.js:323
>  [failed] test plugin headers (0.002s)
>   TypeError: Cannot call method 'appendChild' of undefined
>  Stack Trace:
> TypeError: Cannot call method 'appendChild' of undefined
>     at Object.PluginRegistry.internalRegistry.connect (http://localhost:8080/orion/pluginregistry.js:927:37)
>     at Object.PluginRegistry.internalRegistry.loadManifest (http://localhost:8080/orion/pluginregistry.js:981:48)
>     at PluginRegistry.installPlugin (http://localhost:8080/orion/pluginregistry.js:1267:44)
>     at tests.test plugin headers (http://localhost:8080/js-tests/pluginregistry/testcase.js:428:31)
>     at Array.<anonymous> (http://localhost:8080/orion/test.js:115:23)
>     at _next (http://localhost:8080/orion/test.js:31:35)
>     at notify (http://localhost:8080/orion/Deferred.js:110:46)
>     at run (http://localhost:8080/orion/Deferred.js:29:13) test.js:323
>  [failed] test error (0.001s)
>   TypeError: Cannot call method 'appendChild' of undefined
>  Stack Trace:
> TypeError: Cannot call method 'appendChild' of undefined
>     at Object.PluginRegistry.internalRegistry.connect (http://localhost:8080/orion/pluginregistry.js:927:37)
>     at Object.PluginRegistry.internalRegistry.loadManifest (http://localhost:8080/orion/pluginregistry.js:981:48)
>     at PluginRegistry.installPlugin (http://localhost:8080/orion/pluginregistry.js:1267:44)
>     at tests.test error (http://localhost:8080/js-tests/pluginregistry/testcase.js:442:31)
>     at Array.<anonymous> (http://localhost:8080/orion/test.js:115:23)
>     at _next (http://localhost:8080/orion/test.js:31:35)
>     at notify (http://localhost:8080/orion/Deferred.js:110:46)
>     at run (http://localhost:8080/orion/Deferred.js:29:13) test.js:323
>  [passed] test plugin states (0.141s) test.js:323
>  [passed] test plugin object reference call (0.093s) test.js:323
>  [passed] test testNotAnOrionMesssage (0.108s) test.js:323
> [Test Run] - <top> done - [Failures:7, Test Count:21] (1.123s)
Comment 1 Silenio Quarti CLA 2014-01-15 12:43:06 EST
Has this just started happening?  It seems to be related to the changes I made about a month ago to support UI plugins.
Comment 2 Ken Walker CLA 2014-01-15 12:45:20 EST
Sad face, we've been having trouble getting our client side tests to run.  A Xvfb issue.  So now they're running, and could be from that long ago yes.
Comment 3 Silenio Quarti CLA 2014-01-15 13:10:54 EST
Yes, I confirmed it was my changes that caused it.

The tests that are failing are the ones that only call pluginRegistry.init() (instead of pluginRegistry.start()).  The _parent DIV of the registry is not created in this case.

Simon, is it valid to only call init()? If so, I will move the creation of the parent to init().  Otherwise, we need to fix the test cases.
Comment 4 Silenio Quarti CLA 2014-01-15 13:19:10 EST
Created attachment 239030 [details]
fix if just calling init() is valid
Comment 5 Silenio Quarti CLA 2014-01-15 13:28:58 EST
Confirmed with Simon that patch is good.

Fixed
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=e8f4b6d6d636f6b217c87240431d50c903bd1f91