Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 228175 - 'asked for password' dialog still pop up when running the test after encrypt--then decrypt all variables in datapool (no encrypted data when running)
Summary: 'asked for password' dialog still pop up when running the test after encryp...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P1 major (vote)
Target Milestone: ---   Edit
Assignee: Paul Slauenwhite CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 202695
Blocks:
  Show dependency tree
 
Reported: 2008-04-22 05:03 EDT by Xin Ying Huang CLA
Modified: 2016-05-05 10:32 EDT (History)
6 users (show)

See Also:
dmorris: review+


Attachments
Patch. (2.08 KB, patch)
2008-04-23 15:16 EDT, Paul Slauenwhite CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xin Ying Huang CLA 2008-04-22 05:03:57 EDT
Build ID: tptp45 if6

Steps To Reproduce:
1. Created a junit test project and a encrypted datapool
2. Reference this encrypted datapool into junit test .
3. Prompt user to input password when running this junit test.
4. decrypted all encrypted data in datapool and saved changes to make sure there are no encrypted data in datapool now.
5. Still prompt user to input password (should no dialog poped -up to prompt user input passwords )when running junit test .


More information:

 About this problem , I have checked the workbench side's code , In order to get
encrypted datapool list which used in current test , I have done the below
steps :

1) added a extension point of launchconfigDatapoolHandler in the plugin
org.eclipse.hyades.test.core and implemented this extension point as
org.eclipse.hyades.test.core.internal.launch.datapool.extensions.JUnitLaunchconfigDatapoolHandler
class , in this class I will get encrypted datapool name list from
TPFDeployment & TPFTest 

2) Invoke this Junit extension in the  class of
org.eclipse.hyades.test.core.launch.delegates.AbstractLaunchConfigurationDelegate2
:

  maybe lines :  197 - 213 

I guess this problem only probably caused in above 2 places : TPFDeployment &
TPFTest which used in the JUnitLaunchconfigDatapoolHandler  are not updated
after decrypted datapool   ; or code of #2 wroted in wrong place due to
JUnitLaunchconfigDatapoolHandler are not updated in workbench side at that time
Comment 1 Xin Ying Huang CLA 2008-04-22 05:05:06 EDT
Hi Paul :

Could you pls help forward below problem to right TPTP developer ,such as owner for test.core component ? thanks very much !
Comment 2 Paul Slauenwhite CLA 2008-04-22 06:49:32 EDT
Downgrading the severity since this is an usability issue.

Xin, I will implement the fix for this defect.
Comment 3 Paul Slauenwhite CLA 2008-04-23 14:33:00 EDT
Hours worked on debugging and creating/testing the patch.

The problem is that the challenge is removed by setting it to null when there are no remaining encrypted variables but the org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable.changeKey(String, IDatapool) method does not handle the case when the key is null.
Comment 4 Paul Slauenwhite CLA 2008-04-23 14:37:30 EDT
(In reply to comment #3)
> Hours worked on debugging and creating/testing the patch.
> 
> The problem is that the challenge is removed by setting it to null when there
> are no remaining encrypted variables but the
> org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable.changeKey(String,
> IDatapool) method does not handle the case when the key is null.
> 

Also, the password needs to be removed from memory, forcing the same behavior as closing/opening the datapool editor.
Comment 5 Paul Slauenwhite CLA 2008-04-23 15:16:27 EDT
Created attachment 97294 [details]
Patch.
Comment 6 Paul Slauenwhite CLA 2008-05-09 05:58:46 EDT
Duwayne, please review this morning so we can request PMC approval to integrate in I8.
Comment 7 Paul Slauenwhite CLA 2008-05-09 13:31:10 EDT
Patch checked into CVS (HEAD).
Comment 8 Xin Ying Huang CLA 2008-05-15 01:53:20 EDT
Verfied and it's ok to close now .