Ticket #6252 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

LoadNexusProcessedTest does not test current version of file

Reported by: Karl Palmen Owned by: Karl Palmen
Priority: major Milestone: Release 2.4
Component: Mantid Keywords:
Cc: taylorrj@… Blocked By:
Blocking: Tester: Roman Tolchenov

Description

When testing a fix to #5874, I found that both the files tested by LoadNexusProcessedTest are of an old version in which the instrument folders are arranged differently than are currently produced by SaveNexusProcessed.

One of the files (I suggested focussed.nxs) should be in the new format. I converted this file to the new format by loading and saving as Nexus and found the test worked. This I have not been able to commit, because the new file exceeds the 1024 KB size limit now imposed.

So one needs to either use a smaller file instead of focussed.nxs and modify the unit test accordingly or

override the size limit and run all tests that use this file.

Change History

comment:1 Changed 8 years ago by Martyn Gigg

  • Cc taylorrj@… added

How about creating a temporary saved nexus file for the current version in the test and then removing it when the test is finished, that way we avoid having to add any files to the repository?

comment:2 Changed 8 years ago by Russell Taylor

The very cryptically named LoadRSaveNLoadNcspTest.h already does this, although it could probably use updating to test more recent functionality.

comment:3 Changed 8 years ago by Karl Palmen

Martyn's suggestion has the advantage that the latest version is always tested (should a newer version arise).

comment:4 Changed 8 years ago by Russell Taylor

And as I say, that's exactly what LoadRSaveNLoadNcspTest does. When I mentioned updating I meant add more asserts to check what has been loaded back in.

comment:5 Changed 8 years ago by Karl Palmen

  • Owner set to Karl Palmen
  • Status changed from new to assigned

comment:6 Changed 8 years ago by Martyn Gigg

Ah yes, I'd forgotten about that beauty. How about a rename at the same time, I assume the CSP refers to the fact is uses a CSP file which doesn't really need to be in the name. Something like LoadRawSaveNxsLoadNxsTest.h would at least be slightly less cryptic?

comment:7 Changed 8 years ago by Karl Palmen

  • Status changed from assigned to accepted

comment:8 Changed 8 years ago by Karl Palmen

Rename test as suggested and add comments re #6252

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 6dce4727a6d8d9c172bea87a6c2eb69da0dffe76

comment:9 Changed 8 years ago by Karl Palmen

To test, check that DataHandlingTest LoadNexusProcessedTest has a comment to the effect it handles old version Nexus processed files and tells you which test handles the current version of Nexus processed file. Verify that the test referred to is called LoadRawSaveNxsLoadNxsTest and it does test the loading of a newly created Nexus processed file.

You may wish to compare the folder structure of a test file of LoadNexusProcessedTest with a newly created Nexus processed file (e.g. by saving a workspace to Nexus) and see that the instrument_source and instrument_parameter_map folders have been moved inside the instrument folder in the current version. And so see both versions are different. This can be done with HDFview.

comment:10 Changed 8 years ago by Karl Palmen

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:11 Changed 8 years ago by Karl Palmen

Rename test as suggested and add comments re #6252

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 6dce4727a6d8d9c172bea87a6c2eb69da0dffe76

comment:12 Changed 8 years ago by Roman Tolchenov

  • Status changed from verify to verifying
  • Tester set to Roman Tolchenov

comment:13 Changed 8 years ago by Roman Tolchenov

  • Status changed from verifying to closed

comment:14 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7098

Note: See TracTickets for help on using tickets.