Bug 347286 - [server] problem with junit server tests
Summary: [server] problem with junit server tests
Status: VERIFIED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2011-05-26 06:52 EDT by Piotr Janik CLA
Modified: 2011-09-01 11:42 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Janik CLA 2011-05-26 06:52:30 EDT
Recently I can't run junit server test (i.e. using launch configuration All Server Tests). At the beginning, there is an exception:
java.io.FileNotFoundException: C:\Users\piotr\junit-workspace (Access is denied)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(Unknown Source)
	at org.eclipse.orion.server.configurator.configuration.OrionPreferenceInitializer.readProperties(OrionPreferenceInitializer.java:79)
	at org.eclipse.orion.server.configurator.configuration.OrionPreferenceInitializer.initializeDefaultPreferences(OrionPreferenceInitializer.java:61)
	at org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper$1.run(PreferenceServiceRegistryHelper.java:281)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper.runInitializer(PreferenceServiceRegistryHelper.java:284)	
(...)
and later all the tests fail, because of http 404 returned each time. New directory for junit-workspace, another jvm, clearing all the projects etc. - nothing helped. 
A few days ago, I reverted my workspace to some earlier version (about 19/05) and exception was still thrown, but even so all the server tests passed. 
When I start Orion using web-ide.launch, everything seems to be ok. No exceptions and I can work without problems.
Comment 1 Tomasz Zarna CLA 2011-05-26 07:00:51 EDT
I'm dealing with the same problem here. I'm able to launch the tests once in a while when I'm in debug mode.

(In reply to comment #0)
> A few days ago, I reverted my workspace to some earlier version (about 19/05)
> and exception was still thrown, but even so all the server tests passed.

Are you able to identify the commit that made the difference?
Comment 2 Piotr Janik CLA 2011-05-26 07:25:04 EDT
Well, I've tried and it seems for me, that commit which made the difference is:
[client] Search is broken.
commit 4a45151a248911b0a229b0dde2f30feaf0e45a95
Author: skaegi <simon_kaegi@ca.ibm.com> 2011-05-20 17:41:21

When this version is checked out, the exception is thrown and tests fail. When I check out its parent commit:

Misc doc updates
commit 93397418d39077f9888780f569e7ecf05a4a36fa
Author: John Arthorne <John_Arthorne@ca.ibm.com> 2011-05-19 21:37:23

the exception is thrown, but tests pass.
Comment 3 Tomasz Zarna CLA 2011-05-26 11:12:02 EDT
Have you tried reverting 4a45151a248911b0a229b0dde2f30feaf0e45a95?
Comment 4 John Arthorne CLA 2011-05-26 11:23:52 EDT
I can see the problem. Fix coming... Part of the solution is that we need to specify this system property to avoid jetty from auto-starting (since we start it manually):

-Dorg.eclipse.equinox.http.jetty.autostart=false
Comment 5 John Arthorne CLA 2011-05-26 11:36:45 EDT
Released a fix. Pull the server git repo to get the changes. You also have to make sure this system property is set:

-Dorg.eclipse.equinox.http.jetty.autostart=false

It was really luck that this worked before. Jetty starts a default server if you don't specify this property, and that default server was actually handling all requests when running the tests. The Jetty server started by Orion and by the Orion tests bundle were not being used.
Comment 6 Tomasz Zarna CLA 2011-05-27 06:39:13 EDT
Verified on HEAD.