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

Bug 320667

Summary: [Help] Test connection should actually check for validity of Information Center
Product: [Eclipse Project] Platform Reporter: Chris Austin <ChrisAustin>
Component: User AssistanceAssignee: Chris Austin <ChrisAustin>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cgold, perryja, snehpaul
Version: 3.7   
Target Milestone: 3.7 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 327084    
Attachments:
Description Flags
Validates toc servlet, instead of index.jsp
none
Validates toc servlet, instead of index.jsp url, also reused for Network status page
none
Final Patch
ChrisAustin: iplog+
Fix compile error
none
jdk1.4 compliant patch none

Description Chris Austin CLA 2010-07-22 16:58:13 EDT
In the Eclipse Preferences -> Help -> Content, the 'Test Connection' button only checks to see if the server is available.  It should verify that the the path is a valid Information Center.
Comment 1 Chris Austin CLA 2010-10-06 09:58:31 EDT
The current plan will be to check something in the toc, like help/advanced/tocfragment to make sure valid xml is returned.
Comment 2 Chris Austin CLA 2010-10-06 10:06:35 EDT
Also - this should be added to the Network Status Error page as well.
Comment 3 Snehasish Paul CLA 2010-10-18 10:54:32 EDT
Created attachment 181104 [details]
Validates toc servlet, instead of index.jsp
Comment 4 Chris Austin CLA 2010-10-18 11:57:13 EDT
Thanks Snehasish.  Could you also modify the Network Status Page to use TestConnectionUtility when verifying which IC's are available?
Comment 5 Snehasish Paul CLA 2010-10-19 11:39:51 EDT
Created attachment 181195 [details]
Validates toc servlet, instead of index.jsp url, also reused for Network status page

1. TestConnectionUtility.java validates the toc servlet and not index.jsp for test connection.
2. TestConnectionUtility.java is moved from org.eclipse.help.ui plugin to org.eclipse.help.base, package: org.eclipse.help.internal.base.util.
3. In RemoteStatusData::checkSitesConnectivity(..) method reuses TestConnectionUtility class for validating test connection.
Comment 6 Chris Austin CLA 2010-10-21 11:39:36 EDT
Created attachment 181416 [details]
Final Patch

Thanks Snehasish.  Looks pretty good - I did add one change however.  We now check the toc url to see if '<tocContributions>' is present; this way we know that /toc is not a generic site error page, but an eclipse toc xml page.
Comment 7 Chris Austin CLA 2010-10-21 11:41:57 EDT
Patch committed to HEAD.
Comment 8 Chris Goldthorpe CLA 2010-10-21 13:19:51 EDT
Created attachment 181423 [details]
Fix compile error

There is a compilation error when compiled with a Java 1.4 JRE, which is the setting for org.eclipse.help.base.

I have attached a suggested patch ( I have not tested the patch ).
Comment 9 Chris Goldthorpe CLA 2010-10-21 13:21:28 EDT
Setting state to reopened pending fixing of the compile error. Chris A, please take a look at my patch and commit it if it looks OK.
Comment 10 Chris Austin CLA 2010-10-21 14:11:01 EDT
Created attachment 181429 [details]
jdk1.4 compliant patch

The patch you submitted seemed to be for a different issue.  I saw the compile error once I ensured my workspace had an available 1.4 compiler, and so I resolved it with this jdk1.4 compliant patch.
Comment 11 Chris Goldthorpe CLA 2010-10-21 14:53:53 EDT
I must have submitted the wrong patch. In any case you can set the status back to Fixed.
Comment 12 Chris Austin CLA 2010-10-21 14:56:36 EDT
Patch committed to HEAD (again).
Comment 13 Chris Austin CLA 2010-12-10 12:24:28 EST
*** Bug 314148 has been marked as a duplicate of this bug. ***