From bf740afd1ef8412fa90da148d8f1bba70eaa8c44 Mon Sep 17 00:00:00 2001 From: Steven Glover Date: Wed, 10 Aug 2016 09:47:25 +0000 Subject: [PATCH] MNT-15449 "EagerContentStoreCleaner job not working correctly using Cryptodoc contentstore encryption" handle missing content url key in CryptoContentStore by returning EmptyContentReader, which fixes the issue seen by the customer but means that the DeletedContentBackupCleanerListener will not work with the CryptoContentStore. Also, remove override of testDeleteReaderStates test (this should be handled by the test superclass) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@129409 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../content/AbstractWritableContentStoreTest.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/source/test-java/org/alfresco/repo/content/AbstractWritableContentStoreTest.java b/source/test-java/org/alfresco/repo/content/AbstractWritableContentStoreTest.java index 2c825c02d3..77a7420904 100644 --- a/source/test-java/org/alfresco/repo/content/AbstractWritableContentStoreTest.java +++ b/source/test-java/org/alfresco/repo/content/AbstractWritableContentStoreTest.java @@ -451,14 +451,17 @@ public abstract class AbstractWritableContentStoreTest extends AbstractReadOnlyC writer.getContentUrl(), reader.getContentUrl()); // open the stream onto the content - InputStream is = reader.getContentInputStream(); + InputStream is = reader.exists() ? reader.getContentInputStream() : null; // attempt to delete the content boolean deleted = store.delete(contentUrl); - // close the reader stream - is.close(); - + // close the reader stream + if(is != null) + { + is.close(); + } + // get a fresh reader reader = store.getReader(contentUrl); assertNotNull(reader);