Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 186576

Summary: Plug-in test hangs when launched from a singleton plug-in project.
Product: z_Archived Reporter: Paul Slauenwhite <paulslau>
Component: TPTPAssignee: Paul Slauenwhite <paulslau>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P1 CC: jerome.gout, jptoomey, sadravid
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 182367    
Bug Blocks:    
Attachments:
Description Flags
Patch.
none
Test.Execution.JUnitPluginRunner.testsuite none

Description Paul Slauenwhite CLA 2007-05-11 11:09:26 EDT
Plug-in test hangs when launched from a singleton plug-in project.

When a plug-in is marked standalone, there are multiple plug-ins with the same symbolic name AND extensions/extension points.  If the plug-in only contributes code, there is no need to mark them singletons.  In this case, there is an existing org.eclipse.test plug-in with extensions/extension point provided by Eclipse so the PDE marks your plug-in as standalone.  For example:

Bundle-SymbolicName: org.eclipse.test;singleton:=true

The org.eclipse.hyades.test.tools.core.internal.util.ManifestUtil.getPropertyValue(IFile, String) method (called from org.eclipse.hyades.test.tools.core.internal.util.PluginProjectUtil.getBundleSymbolicName(IProject)) parses the symbolic name (ID) property (Bundle-SymbolicName) of the manifest file (e.g. /META-INF/MANIFEST.MF) but does not strip the ';singleton:=true' suffix.  As such, the correct symbolic name (ID) for the plug-in is not resolved causing the test execution to hang.

A new test case will need to be added to the test bucket to cover this case.

[Source: http://www.eclipse.org/newsportal/article.php?id=3835&group=eclipse.tptp#3835]
Comment 1 Paul Slauenwhite CLA 2007-05-11 11:11:49 EDT
Created attachment 66873 [details]
Patch.
Comment 2 Paul Slauenwhite CLA 2007-05-11 12:24:53 EDT
New test case added to both org.eclipse.hyades.test.java.tests\manual\regressionTests\Test.Execution.JUnitPluginRunner.testsuite and org.eclipse.hyades.test.java.tests\manual\regressionTests\Test.Execution.JUnitRunner.testsuite:

Abstract: Test to verify defect 186576

Version: May 11, 2007

Since: May 11, 2007

Authors: 
  1. Paul Slauenwhite

Requires: 

Platforms: 
  1. Windows
  2. Linux

Notes: 

Steps: 
  1. Create a plug-in project named 'org.eclipse.test' for a Eclipse 3.1+ target platform containing a manifest file (e.g. /META-INF/MANIFEST.MF).
  2. Add an extension point to the plug-in project so the PDE changes the plug-in project to a stand-alone plug-in project.
  3. Create a new TPTP JUnit Plug-in test suite in the plug-in project.
  4. Add some test methods and invitation to the behavior of the TPTP JUnit Plug-in test suite.
  5. Execute the TPTP JUnit Plug-in test suite.

Results: 
  1. Ensure the dialog speificy the JUnit/TPTP depeancnies added to the plug-in project are correct.  They can be verified in the information dialog opened when the TPTP JUnit Plug-in test suite is created.
  2. Ensure the TPTP JUnit Plug-in test suite executes to completion.
  3. Ensure the execution result generated from executing the TPTP JUnit Plug-in test suite is generated and correct.
Comment 3 Paul Slauenwhite CLA 2007-05-11 12:35:52 EDT
Created attachment 66901 [details]
Test.Execution.JUnitPluginRunner.testsuite
Comment 4 Joe Toomey CLA 2007-05-11 12:53:00 EDT
Reviewed -- looks fine.
Comment 5 Paul Slauenwhite CLA 2007-05-11 13:53:01 EDT
Patch and test suite checked-in to CVS (HEAD).
Comment 6 Paul Slauenwhite CLA 2007-06-02 14:51:58 EDT
Reporter: Please verify and close in preparation for shutting down the TPTP 4.4 release.  Thanks.
Comment 7 Paul Slauenwhite CLA 2007-06-27 15:48:54 EDT
Verified in TPTP-4.4.0-200706140100C.