Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #11238 (closed)

Opened 6 years ago

Closed 3 years ago

Bug: commit tests require online XML validation

Reported by: rleigh Owned by: mlinkert
Priority: minor Milestone: B-F-5.2.0
Component: Bio-Formats Version: 4.4.8
Keywords: n.a. Cc:
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

testValidXML (omexmlService.validateOMEXML) requires network connectivity in order to download the schema for validation. However, we already have a local copy of the schema--can't we just use it directly? This will be both faster and more reliable--no transient test failures. And it will also make it possible to run the tests offline.

Change History (10)

comment:1 Changed 6 years ago by mlinkert

  • Milestone changed from Unscheduled to Testing
  • Sprint set to Testing and Docs (1)

comment:2 Changed 6 years ago by mlinkert

  • Owner changed from mlinkert to rleigh

comment:3 Changed 6 years ago by jamoore

  • Milestone changed from Testing and Docs to Testing2
  • Sprint Testing and Docs (1) deleted

comment:4 Changed 5 years ago by mlinkert

  • Milestone changed from Testing2 to 5.0.3

comment:5 Changed 5 years ago by mlinkert

  • Milestone changed from 5.1.0-m4 to 5.1.1
  • Owner changed from rleigh to mlinkert

I don't think we're going to get away from requiring network connectivity, as we'll minimally need to retrieve http://www.w3.org/2001/XMLSchema. Using the local schemas may still be possible by using a CatalogReader? (http://xerces.apache.org/xml-commons/) to do entity resolution (http://java.dzone.com/articles/use-local-resources-when).

Pushing to 5.1.1, since this needs a day or two of dedicated time and transient validation errors are not a common problem.

comment:6 Changed 5 years ago by rleigh

We don't need any network connectivity--it's all done using XML Catalog for the C++ implementation where I implemented a caching catalogue resolver for Xerces-C. There are catalogue files for all schema versions plus ancillary schemas, so it works 100% offline today. It's likely even easier for Java since the built-in Xerces implementation already has a resolver (XMLCatalogResolver). Or it's fairly simple to implement our own if the existing one won't work with the embedded files from the jar. I think the jar already embeds all the catalogues along with the schemas, including the 2001 XMLSchema, so the only missing piece is plugging the catalogue resolver into the parser. There's a top-level catalogue in the released-schema directory which sources all the other catalogues, so the resolver only needs pointing to that one and it will find every schema file.

comment:7 Changed 4 years ago by jburel

  • Milestone changed from 5.1.1 to 5.1.2

Moving to 5.1.2 when reviewing model example.
The Downgrade Java integration tests do not use schema resolver. Discussed with Roger yesterday

comment:8 Changed 4 years ago by mlinkert

  • Milestone changed from 5.1.2 to 5.x

Pushing after discussion with Jean-Marie.

comment:9 Changed 3 years ago by jamoore

  • Milestone changed from 5.x to Unscheduled

comment:10 Changed 3 years ago by sbesson

  • Milestone changed from Unscheduled to B-F-5.2.0
  • Resolution set to fixed
  • Status changed from new to closed

Should have been addressed by https://github.com/openmicroscopy/bioformats/pull/1999/. DEV schemas tests are running without the schema being published.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.84683 sec.)

We're Hiring!