ACE-4766 Fix intermittent unit test by verifying number of characters.

Previously we were verifying the number of bytes, which failed for strings
containing non-ASCII characters (such as £).


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@118737 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tom Page
2015-11-27 10:13:18 +00:00
parent 2468d2a64b
commit 98db032925

View File

@@ -195,10 +195,10 @@ public class RemoteFileFolderLoaderTest extends BaseWebScriptTest
// We also expect the default language description to be present
String description = (String) nodeService.getProperty(fileNodeRef, ContentModel.PROP_DESCRIPTION);
assertNotNull("No description", description);
assertEquals("Description length incorrect: ", 128L, description.getBytes("UTF-8").length);
assertEquals("Description length incorrect: \"" + description + "\"", 128L, description.length());
}
}
/**
* Load 15 files; 1K size; 1 document sample; force binary storage
*/