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

Bug 362535

Summary: can not run services test in deployed mode
Product: z_Archived Reporter: Jing Qian <jqian>
Component: EDTAssignee: Yun Feng Ma <mayunf>
Status: CLOSED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: jvincens, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
test projects none

Description Jing Qian CLA 2011-10-31 21:32:28 EDT
Using installable build of 20111031_0901
This is blocking issue for services testing in deployed mode. 

use kan-cvs-save
/cvsroot/rbd
check out project egl.rest from cvs moldule org.eclipse.edt.tests.services

right click on egl.rest, Generate EGL Test Driver => Javascript Asynchronize

you will see another project egl.rest.eunit.javascriptasync

under eunitgen.libraries.async, open TestPrimitives_rui.egl in EGL RUI editor, go to the preview pane (wait a little), you will see some text in the browser saying running tests....

deploy this project (egl.rest.eunit.javascriptasync) to a target project called
egl.rest.tgt

run TestPrimitives_rui.html on server, I get blank page in IE, FF and chrome.

After Joe looked into it, he found

the javascript runitme code is doing:
egl.loadScript( "org.eclipse.edt.eunit.runtime","ConstantsLib" );
That function is only defined in egl_development.js which I don't think is included in the deployed version.

Note: I have some .egl file in org.eclipse.edt.eunit.runtime folder as part of the "system eglar", so I generated these .egl into .js, put the ones have debug information into the javascript runtime.

Let me know if there is something I need to fix to get this going.  Thanks
Comment 1 Jing Qian CLA 2011-10-31 22:28:57 EDT
Created attachment 206245 [details]
test projects
Comment 2 Yun Feng Ma CLA 2011-11-01 06:23:55 EDT
Hi Jing,

There are two solutions for this issue:
1) Remove the below lines in /org.eclipse.edt.runtime.javascript/runtime/org/eclipse/edt/eunit/runtime/TestListMgr.js
			egl.loadScript( "org.eclipse.edt.eunit.runtime","ConstantsLib" );
			egl.loadScript( "org.eclipse.edt.eunit.runtime","LogResult" );
			egl.loadScript( "org.eclipse.edt.eunit.runtime","AssertionFailedException" );
			egl.loadScript( "org.eclipse.edt.eunit.runtime","MultiStatus" );

2) Put a empty method named egl.loadScript into egl.js.

I prefer the first one, because TestListMgr.js is only copied once if there is no change, right?
Comment 3 Yun Feng Ma CLA 2011-11-01 06:36:01 EDT
The third solution is that excluding the all parts in package "org.eclipse.edt.eunit.runtime" to generate "egl.loadScript".

I've checked in a fix with the third solution. You need regenerated TestListMgr.egl using next build and copy it to javascript runtime. Thanks.
Comment 4 Jing Qian CLA 2011-11-01 11:25:13 EDT
solution 3 is not acceptable as it is hard coding to check the package name of eunit.runtime pacakges, this may not work for me, since under this packages, I have 4 files inside the "system eglar", AND another 5 files inside user's workspace.

We should NOT distinguish system defined part vs. user defined part, they should be treated equally.

anyway, please back out solution3, check in solution 2

thx
Comment 5 Yun Feng Ma CLA 2011-11-01 11:43:56 EDT
Revert the change and fixed with solution 2 now. Thanks.
Comment 6 Jing Qian CLA 2011-11-15 15:41:33 EST
verified with 201111110901's build