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

Bug 339069

Summary: Multiple deletion of Test Cases results in undeletable Test Cases reappearing
Product: [Technology] Jubula Reporter: Alexandra Schladebeck <alexandra.schladebeck>
Component: CoreAssignee: Markus Tiede <markus.tiede>
Status: CLOSED FIXED QA Contact: Tim Winselmann <tim.winselmann>
Severity: blocker    
Priority: P3 CC: markus.tiede
Version: 0.9.0   
Target Milestone: 1.0   
Hardware: All   
OS: All   
Whiteboard:

Description Alexandra Schladebeck CLA 2011-03-07 05:26:11 EST
If multiple Test Cases are deleted from a project, they disappear from the Test Case Browser, but some of them reappear after a refresh. Test Cases that reappear in this way are not deletable and the project itself cannot be deleted. 

To reproduce:

1. Create two Test Cases in the Test Case Browser.
2. Select both and delete them.
3. Refresh the project.
4. One of the Test Cases reappears.

The Test Case cannot be opened or deleted. If this is tried, the message: "Object was deleted by another transaction" comes and a refresh is carried out. This doesn't remove the Test Case or change the situation though. 

The Test Cases disappear when the connection to the Database is closed (e.g. via select database with another database or via a restart).
Comment 1 Markus Tiede CLA 2011-03-08 09:07:21 EST
This is reproducible for top-level test cases and categories in the TCB; although all test cases are correctly deleted from the database they re-appear after a project refresh / reload.

This is somehow related to the second-level-cache (http://en.wikibooks.org/wiki/Java_Persistence/Caching) of the eclipselink EntityManagerFactory; I currently disabled the second-level-cache completely 

http://git.eclipse.org/c/jubula/org.eclipse.jubula.core.git/commit/?id=d27d9619e7f39e1079c37c5a37a50326b6b5a160

If this should lead to a severe performance decrease we could also clear the cache manually, e.g. on project load / reload or for specific database queries.
Comment 2 Tim Winselmann CLA 2011-03-15 09:16:41 EDT
No Test Cases reappear after a multiple deletion anymore.