Opened 14 years ago
Closed 14 years ago
#1351 closed defect (done)
The StorableConstructor- and CloningConstructorUnitTest fail if all tests in the solution are executed
Reported by: | mkommend | Owned by: | swagner |
---|---|---|---|
Priority: | medium | Milestone: | HeuristicLab 3.3.3 |
Component: | Tests | Version: | 3.3.3 |
Keywords: | Cc: |
Description
The problem is that the unit tests accessor assemblies and all unit tests assemblies are loaded and tested.
Change History (16)
comment:1 Changed 14 years ago by mkommend
- Status changed from new to accepted
comment:2 Changed 14 years ago by mkommend
- Owner changed from mkommend to swagner
- Status changed from accepted to reviewing
comment:3 Changed 14 years ago by mkommend
- Owner changed from swagner to mkommend
- Status changed from reviewing to assigned
comment:4 Changed 14 years ago by mkommend
- Owner changed from mkommend to swagner
- Status changed from assigned to reviewing
Corrected plugin check in unit tests with r5168.
comment:5 follow-up: ↓ 8 Changed 14 years ago by swagner
- Owner changed from swagner to mkommend
- Status changed from reviewing to assigned
Review comments:
- I think the TestAssemblyExtension in PluginLoader should be ".Tests.dll" instead of ".test.dll".
- PluginLoader.pluginAssemblies only contains assemblies which export a plugin type. A plugin might have several assemblies though and only one of them contains a plugin type. These other assemblies are not included in PluginLoader.pluginAssemblies and will therefore also not be checked by the tests.
comment:6 Changed 14 years ago by mkommend
- Status changed from assigned to accepted
comment:7 Changed 14 years ago by mkommend
Corrected TestAssemblyExtension in PluginLoader with r5272.
comment:8 in reply to: ↑ 5 Changed 14 years ago by mkommend
- Status changed from accepted to assigned
Replying to swagner:
- PluginLoader.pluginAssemblies only contains assemblies which export a plugin type. A plugin might have several assemblies though and only one of them contains a plugin type. These other assemblies are not included in PluginLoader.pluginAssemblies and will therefore also not be checked by the tests.
It is currently not possible to get all plugins from the PluginInfrastructure because a LightWeightApplicationManager is used during the execution of UnitTests which does not support plugin discovery. I also do not want to reimplement the plugin discovery logic again in the UnitTest project and that is why not all assemblies are checked in the current version. The best solution would be to enable plugin discovery in the LightWeightApplicationManager which would also make the PluginLoader obsolete.
comment:9 Changed 14 years ago by mkommend
- Status changed from assigned to accepted
comment:10 Changed 14 years ago by mkommend
- Owner changed from mkommend to swagner
- Status changed from accepted to reviewing
Corrected HL3.3 tests project to test all assemblies and not only assemblies that contain a Plugin class with r5306.
comment:11 Changed 14 years ago by swagner
- Status changed from reviewing to assigned
comment:12 Changed 14 years ago by swagner
- Status changed from assigned to accepted
comment:13 Changed 14 years ago by swagner
Adapted PluginLoader in r5407 to ignore cases in assembly paths, additionally load exe-files and ignore assemblies which cannot be loaded.
comment:14 Changed 14 years ago by swagner
- Owner changed from swagner to mkommend
- Status changed from accepted to reviewing
comment:15 Changed 14 years ago by mkommend
- Owner changed from mkommend to swagner
- Status changed from reviewing to readytorelease
Thanks for refactoring the PluginLoader.
comment:16 Changed 14 years ago by mkommend
- Resolution set to done
- Status changed from readytorelease to closed
- Version changed from 3.3.2 to 3.3.3
Corrected CloningConstructorTest and StorableConstructorTest to test only HL plugin assemblies with r5151.