Bug 258343 - [tests] jUnit failures after org.eclipse.core.runtime.xml content type is disabled
Summary: [tests] jUnit failures after org.eclipse.core.runtime.xml content type is dis...
Status: RESOLVED WONTFIX
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.4.2   Edit
Assignee: Nick Sandonato CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on: 251786 258208
Blocks:
  Show dependency tree
 
Reported: 2008-12-10 14:18 EST by Nick Sandonato CLA
Modified: 2012-12-12 15:02 EST (History)
2 users (show)

See Also:
thatnitind: review? (nsand.dev)


Attachments
patch removing TestContentTypeDetectionForXML (4.09 KB, patch)
2008-12-10 15:30 EST, Nick Sandonato CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Sandonato CLA 2008-12-10 14:18:49 EST
A number of jUnits are failing for TestContentTypeDetectionForXML because of a StringIndexOutOfBoundsException being thrown from XMLContentDescriber.

Disabling testFile106() will resolve the series of failures caused by the org.eclipse.core.runtime.xml content type being disabled.

Also fixing testFile120WS() as its content type is no longer described by XMLContentDescriber.
Comment 1 Nick Sandonato CLA 2008-12-10 15:30:39 EST
Created attachment 120105 [details]
patch removing TestContentTypeDetectionForXML

I ended up temporarily removing the entire TestContentTypeDetectionForXML test because one of the workspaces opened for another test contained MalformedNoEncoding.xml, which when an Icon was trying to be associated with the file, would cause the org.eclipse.core.runtime.xml content type to be disabled and cause other tests in TestContentTypeDetectionForXML to fail.
Comment 2 David Carver CLA 2008-12-25 17:51:59 EST
Is this test suite being added back in to be addressed in 3.1M5?  As an adopter I have concerns when tests are removed just to get something green.  It doesn't address the real problem, and the tests are typically never added back in.
Comment 3 Nitin Dahyabhai CLA 2008-12-26 13:20:12 EST
Yes, but only after it's been adjusted to compensate for what the platform describer now supports/doesn't support.
Comment 4 Nick Sandonato CLA 2009-01-05 11:00:46 EST
The test suite has been added back in, but testFile106 still fails due to changes in the XMLContentDescriber, which no longer identifies XML files with an empty encoding as XML content.

It would be nice if our ContentDescriberForXML would get an opportunity to run and try and identify this case as an XML content type.  I think ultimately, it will depend on bug 251786 being addressed.
Comment 5 David Carver CLA 2009-01-05 11:17:43 EST
(In reply to comment #4)
> The test suite has been added back in, but testFile106 still fails due to
> changes in the XMLContentDescriber, which no longer identifies XML files with
> an empty encoding as XML content.
> 
> It would be nice if our ContentDescriberForXML would get an opportunity to run
> and try and identify this case as an XML content type.  I think ultimately, it
> will depend on bug 251786 being addressed.
> 

Nick...a temporary work around might be to create a Fragment to be added to patch up the file, and then apply the correct fix once this is corrected in the platform.  Otherwise the test will just fail when it gets released.
Comment 6 Nick Sandonato CLA 2009-03-17 16:37:54 EDT
Upping the priority and will revisit early in M7.
Comment 7 Ian Tewksbury CLA 2010-03-09 15:13:32 EST
Many tests still disabled in TestContentTypeDetectionForXML in WTP 3.2
Comment 8 Nick Sandonato CLA 2012-12-12 15:02:29 EST
Resolving for now. This has been bumped repeatedly, but cannot be resolved without its dependency.