tmf: Increase timeout for indexing in TestRefreshTextTrace
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Wed, 13 Apr 2016 17:31:02 +0000 (13:31 -0400)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Wed, 13 Apr 2016 18:58:02 +0000 (14:58 -0400)
The additional output added recently to this test confirmed that
during the test, the trace is being slowly indexed without being
stuck and ends up timing out. This change significantly increases
the timeout (20 secs to 5 mins) in order to allow more indexing
time when the machine running the test is under heavy load.

Change-Id: I8e76ced07a5a09b6bd14a7b11d12c925c1ce3df2
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/70581
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ui/swtbot/tests/viewers/events/TestRefreshTextTrace.java

index cfea536781389d84530d502ebdd9e80fa8fca179..c18d1e55de50e631ae98f73f6213a6a02393b939 100644 (file)
@@ -51,6 +51,7 @@ public class TestRefreshTextTrace {
     private static final int NB_REFRESH = 3;
     private static final long SECOND_TO_MILLISECOND = 1000;
     private static final long MICROSECOND_TO_NANOSECOND = 1000000;
+    private static final int INDEXING_TIMEOUT = 300000;
 
     private static final Calendar CURRENT = Calendar.getInstance();
     private static final String TRACE_LOCATION = TmfTraceManager.getTemporaryDirPath() + File.separator + "test.txt";
@@ -115,7 +116,7 @@ public class TestRefreshTextTrace {
             traceItem.contextMenu("Refresh").click();
 
             // Make sure the refresh is completed
-            fBot.waitUntil(new NumberOfEventsCondition(activeTrace, getNbWrittenEvents()));
+            fBot.waitUntil(new NumberOfEventsCondition(activeTrace, getNbWrittenEvents()), INDEXING_TIMEOUT);
         }
 
         // Make sure the end of the table matches what we expect
@@ -135,11 +136,7 @@ public class TestRefreshTextTrace {
 
         @Override
         public boolean test() throws Exception {
-            if (fTrace.getNbEvents() != fNbEvents) {
-                System.out.println("Waiting for expected " + fNbEvents + " events. Current: " + fTrace.getNbEvents());
-                return false;
-            }
-            return true;
+            return fTrace.getNbEvents() == fNbEvents;
         }
 
         @Override
This page took 0.025066 seconds and 5 git commands to generate.