changeset 1930:fbce04284f89

fix fxml test RT-23413. Added warmup before actual performance comparison
author tb115823 <Tomas.Brandalik@oracle.com>
date Tue, 04 Dec 2012 16:04:44 +0100
parents 501088150d56
children 9353d8ea7c4b
files javafx-fxml/test/javafx/fxml/RT_23413Test.java
diffstat 1 files changed, 9 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-fxml/test/javafx/fxml/RT_23413Test.java	Tue Dec 04 10:01:08 2012 +0100
+++ b/javafx-fxml/test/javafx/fxml/RT_23413Test.java	Tue Dec 04 16:04:44 2012 +0100
@@ -25,25 +25,24 @@
 
 package javafx.fxml;
 
-import javafx.fxml.FXMLLoader;
-
 import java.net.URL;
-
+import static org.junit.Assert.assertTrue;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
-import org.junit.Ignore;
-
 public class RT_23413Test {
     private static URL LOCATION = RT_23413Test.class.getResource("rt_23413.fxml");
     private static final int COUNT = 500;
-
+    
     @Test
-    @Ignore
     public void testTemplate() throws Exception {
+        //warmup
+        System.out.println("Warmup ...");
+        testTemplate(false);
+        
+        System.out.println("Testing now ...");
         assertTrue(testTemplate(true) < testTemplate(false));
     }
-
+    
     private long testTemplate(boolean template) throws Exception {
         FXMLLoader loader = new FXMLLoader(LOCATION);
         loader.setTemplate(template);
@@ -64,6 +63,6 @@
 
         System.out.printf("template:%b duration:%dms average:%d\n", template, duration, average);
 
-        return average;
+        return duration;
     }
 }