Ticket #8148 (closed: fixed)
ParameterMap::operator== can't compare in-memory & file-loaded workspace
Reported by: | Martyn Gigg | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | critical | Milestone: | Release 3.0 |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Wenduo Zhou |
Description
This was introduced in this commit https://github.com/mantidproject/mantid/commit/4b7aee01301d57493c72b16e0dcb28de8ec18efa#diff-69ebb8171c57e694247f8396fe869c43
Running the script below reports an error about the parameter map not matching.
Load(Filename=r'GEM59381.raw',OutputWorkspace='GEM59381',SpectrumMax=50) SaveNexus('GEM59381','test_parmap.nxs') Load(Filename=r'test_parmap.nxs',OutputWorkspace='GEM59381_save_load') CheckWorkspacesMatch('GEM59381', 'GEM59381_save_load')
This is causing systemtest failures on develop at the moment when changes from #8108 were merged in.
Change History
comment:2 Changed 7 years ago by Martyn Gigg
- Status changed from inprogress to verify
- Resolution set to fixed
Branch: bugfix/8148_parmap_comparison_broken
Tester: The above script should fail before the merge & pass afterward. Please also verify a failure case. This could be achieved by moving a component, e.g. adding
MoveInstrumentComponent('GEM59381',ComponentName="undulator",Z=-16,RelativePosition=False) CheckWorkspacesMatch('GEM59381', 'GEM59381_save_load')
to the end of the script. The final CheckWorkspacesMatch should now complain about the ParameterMap.
comment:3 Changed 7 years ago by Wenduo Zhou
- Status changed from verify to verifying
- Tester set to Wenduo Zhou
comment:4 Changed 7 years ago by Wenduo Zhou
I was not able to reproduce the failed case before merging.
But the claimed error cannot be found in the merged code. Both scripts work as what is predicted. So the ticket is passed.
comment:5 Changed 7 years ago by Wenduo Zhou
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/bugfix/8148_parmap_comparison_broken'
Full changeset: 2184a87b322fcd49629ffdd3b4d6dc5bb937a9b9
ParameterMap::operator== is now based on component names.
The check was on component IDs but these are only valid at runtime. Refs #8148
Changeset: 02a8688c48559c5d213191ed318e326b3364fead