You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2020/07/31 15:36:39 UTC

[openoffice] 03/05: Allow for tested editing time to be a little longer than expected.

This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit af962848170ab650f03ddc3df822c2a6c62cee98
Author: Damjan Jovanovic <da...@apache.org>
AuthorDate: Fri Jul 31 06:12:48 2020 +0200

    Allow for tested editing time to be a little longer than expected.
    
    Patch by: me
    
    (cherry picked from commit 13ae91bf77e0f3b925db7293580c0ad450ab5530)
---
 test/testuno/source/fvt/uno/sd/file/CheckFileProperties.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/test/testuno/source/fvt/uno/sd/file/CheckFileProperties.java b/test/testuno/source/fvt/uno/sd/file/CheckFileProperties.java
index f9b9407..e4cbf3c 100644
--- a/test/testuno/source/fvt/uno/sd/file/CheckFileProperties.java
+++ b/test/testuno/source/fvt/uno/sd/file/CheckFileProperties.java
@@ -302,7 +302,8 @@ public class CheckFileProperties {
 	 * UI entry: File->Properties->General->Total editing time*/
 	@Test
 	public void testGeneralEditingDuration() throws Exception {
-		int editingDuration = 60;
+		final int editingDuration = 60;
+                final int maxEditingDuration = 70;
 		
 		XDocumentProperties xDocPro = getDocumentProperties();
 		
@@ -312,7 +313,9 @@ public class CheckFileProperties {
 		app.closeDocument(m_xSDComponent);
 		m_xSDComponent = app.loadDocument(m_filePath);
 		XDocumentProperties xDocPro2 = getDocumentProperties();
-		assertEquals("Totally editing time should be "+ editingDuration, editingDuration, xDocPro2.getEditingDuration());		
+                // It can take a few seconds longer to save the file, increasing it above editingDuration
+		assertTrue("Total editing time >= "+ editingDuration, Integer.compare(editingDuration, xDocPro2.getEditingDuration()) <= 0);
+                assertTrue("Total editing time <= "+ maxEditingDuration, Integer.compare(xDocPro2.getEditingDuration(), maxEditingDuration) <= 0);
 	}
 	
 	/*