| Summary: | OpenSourceCommandHandler causes slowness and memory usage in Test Navigator | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Paul Slauenwhite <paulslau> | ||||
| Component: | TPTP | Assignee: | Bozier jerome <jerome.bozier> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | Kathy Chan <kathy> | ||||
| Severity: | major | ||||||
| Priority: | P1 | CC: | alexberns | ||||
| Version: | unspecified | Flags: | paulslau:
review-
|
||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | adopter | ||||||
| Bug Depends on: | 327681 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
|
Description
Paul Slauenwhite
Unfortunately, resolving the test suite from the proxy node is necessary to resolve the associated test class, which is in the test suite/case model. We may be able change the behaviour of this handler by always enabling it for test suite/case proxy nodes and then once executed, display an error dialog if the associated test class cannot be resolved (e.g. a test class is not defined in the test suite). Requires a sizing. Created attachment 180957 [details]
patch
this patch fixes the problem on the following way :
. menu is always enabled on junit test case/test suite
. check is only performed when executing the command
. if check fail, an error message appear
because of bugzilla 327681, i am not able to create a test case to reproduce the problem (menu does no longer appear).
to be able to reproduce it, i had to use a tptp 4.7.0 and only import hyades.test.tools.ui (hyades.test.tool.junit.plugin disable the menu entry when imported)
Paul, could you review this patch please ? many thanks in advance Patch reviewed with the following comments: -I would tighten the constraints on enabling this menu. I would check the proxy type and only enable for JUnit/JUnit Plug-in/URL suite/case proxy nodes, since this context menu will be incorrectly enabled but broken in the consuming product. -We cannot create new messages in a maintenance release. I would suggest logging the error condition and reusing WorkspaceResourceProviderService_SOURCE_FILE_DNE in /org.eclipse.hyades.test.core/src/org/eclipse/hyades/test/core/testservices/resources/messages.properties. -Defect 327681 should be fixed before delivering the fix for this for testing purposes. (In reply to comment #4) > Patch reviewed with the following comments: > > -I would tighten the constraints on enabling this menu. I would check the > proxy type and only enable for JUnit/JUnit Plug-in/URL suite/case proxy nodes, > since this context menu will be incorrectly enabled but broken in the consuming > product. > this constraint is done in the plugin.xml file : we already check if the selected element is instance of : . JUnitTestSuiteProxyNode . JUnitTestCaseProxyNode . junit HTTPTestSuiteProxyNode . junit HTTPTestCaseProxyNode . JUnitPluginTestSuiteProxyNode . JUnitPluginTestCaseProxyNode check at selection time is so useless outside of checking if source exists (and we remove this part) > -We cannot create new messages in a maintenance release. I would suggest > logging the error condition and reusing > WorkspaceResourceProviderService_SOURCE_FILE_DNE in > /org.eclipse.hyades.test.core/src/org/eclipse/hyades/test/core/testservices/resources/messages.properties. on it > -Defect 327681 should be fixed before delivering the fix for this for testing > purposes. done new patch incoming soon with fixed messages (In reply to comment #5) > (In reply to comment #4) > > Patch reviewed with the following comments: > > > > -I would tighten the constraints on enabling this menu. I would check the > > proxy type and only enable for JUnit/JUnit Plug-in/URL suite/case proxy nodes, > > since this context menu will be incorrectly enabled but broken in the consuming > > product. > > > this constraint is done in the plugin.xml file : we already check if the > selected element is instance of : > . JUnitTestSuiteProxyNode > . JUnitTestCaseProxyNode > . junit HTTPTestSuiteProxyNode > . junit HTTPTestCaseProxyNode > . JUnitPluginTestSuiteProxyNode > . JUnitPluginTestCaseProxyNode > check at selection time is so useless outside of checking if source exists (and > we remove this part) You're right. Thanks. > > -We cannot create new messages in a maintenance release. I would suggest > > logging the error condition and reusing > > WorkspaceResourceProviderService_SOURCE_FILE_DNE in > > /org.eclipse.hyades.test.core/src/org/eclipse/hyades/test/core/testservices/resources/messages.properties. > on it Thanks. > > -Defect 327681 should be fixed before delivering the fix for this for testing > > purposes. > done > > new patch incoming soon with fixed messages Great! fix provided in 327681 patch (this part of code have been refactored to fix both problems) *** This bug has been marked as a duplicate of bug 327681 *** |