tmf: Merge TmfEventProvider#getType() and ITmfTrace#getEventType()
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.core.tests / src / org / eclipse / tracecompass / tmf / core / tests / trace / TmfTraceTest.java
index 74e7a6c502b243c629c14368ada1f05a0bc2bca8..10a5811380c45e9cc2e5eff624b04e87577a0ccf 100644 (file)
@@ -26,6 +26,7 @@ import java.io.IOException;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.Vector;
+import java.util.concurrent.TimeUnit;
 
 import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.Path;
@@ -66,7 +67,7 @@ public class TmfTraceTest {
 
     /** Time-out tests after 20 seconds */
     @Rule
-    public TestRule globalTimeout= new Timeout(20000);
+    public TestRule globalTimeout= new Timeout(20, TimeUnit.SECONDS);
 
     // ------------------------------------------------------------------------
     // Variables
@@ -118,7 +119,7 @@ public class TmfTraceTest {
             TmfTraceStub trace = new TmfTraceStub(testfile.toURI().getPath(), ITmfTrace.DEFAULT_TRACE_CACHE_SIZE, false, null);
             trace.indexTrace(true);
 
-            assertEquals("getType", ITmfEvent.class, trace.getType());
+            assertEquals("getEventType", ITmfEvent.class, trace.getEventType());
             assertNull("getResource", trace.getResource());
             assertEquals("getPath", testfile.toURI().getPath(), trace.getPath());
             assertEquals("getCacheSize", ITmfTrace.DEFAULT_TRACE_CACHE_SIZE, trace.getCacheSize());
@@ -147,7 +148,7 @@ public class TmfTraceTest {
             TmfTraceStub trace = new TmfTraceStub(testfile.toURI().getPath(), ITmfTrace.DEFAULT_TRACE_CACHE_SIZE, interval);
             trace.indexTrace(true);
 
-            assertEquals("getType", ITmfEvent.class, trace.getType());
+            assertEquals("getEventType", ITmfEvent.class, trace.getEventType());
             assertNull("getResource", trace.getResource());
             assertEquals("getPath", testfile.toURI().getPath(), trace.getPath());
             assertEquals("getCacheSize", ITmfTrace.DEFAULT_TRACE_CACHE_SIZE, trace.getCacheSize());
@@ -176,7 +177,7 @@ public class TmfTraceTest {
             TmfTraceStub trace = new TmfTraceStub(original);
             trace.indexTrace(true);
 
-            assertEquals("getType", ITmfEvent.class, trace.getType());
+            assertEquals("getEventType", ITmfEvent.class, trace.getEventType());
             assertNull("getResource", trace.getResource());
             assertEquals("getPath", testfile.toURI().getPath(), trace.getPath());
             assertEquals("getCacheSize", ITmfTrace.DEFAULT_TRACE_CACHE_SIZE, trace.getCacheSize());
@@ -238,7 +239,7 @@ public class TmfTraceTest {
             fail("TmfTrace.initialize() - Exception thrown");
         }
 
-        assertEquals("getType", ITmfEvent.class, trace.getType());
+        assertEquals("getEventType", ITmfEvent.class, trace.getEventType());
         assertNull  ("getResource", trace.getResource());
         assertEquals("getPath", path, trace.getPath());
         assertEquals("getCacheSize", ITmfTrace.DEFAULT_TRACE_CACHE_SIZE, trace.getCacheSize());
@@ -266,7 +267,7 @@ public class TmfTraceTest {
             fail("TmfTrace.initialize() - Exception thrown");
         }
 
-        assertEquals("getType", ITmfEvent.class, trace.getType());
+        assertEquals("getEventType", ITmfEvent.class, trace.getEventType());
         assertNull  ("getResource", trace.getResource());
         assertEquals("getPath", path, trace.getPath());
         assertEquals("getCacheSize", ITmfTrace.DEFAULT_TRACE_CACHE_SIZE, trace.getCacheSize());
@@ -285,7 +286,7 @@ public class TmfTraceTest {
         // Instantiate an "empty" trace
         final TmfTraceStub trace = new TmfTraceStub();
 
-        assertNull  ("getType",  trace.getType());
+        assertNull  ("getEventType",  trace.getEventType());
         assertNull  ("getResource", trace.getResource());
         assertEquals("getCacheSize", ITmfTrace.DEFAULT_TRACE_CACHE_SIZE, trace.getCacheSize());
         assertEquals("getStreamingInterval", 0, trace.getStreamingInterval());
@@ -314,7 +315,7 @@ public class TmfTraceTest {
             fail("indexing");
         }
 
-        assertEquals("getType", ITmfEvent.class, trace.getType());
+        assertEquals("getEventType", ITmfEvent.class, trace.getEventType());
         assertNull  ("getResource", trace.getResource());
         assertEquals("getCacheSize", ITmfTrace.DEFAULT_TRACE_CACHE_SIZE, trace.getCacheSize());
         assertEquals("getStreamingInterval", 0, trace.getStreamingInterval());
@@ -1337,7 +1338,7 @@ public class TmfTraceTest {
     @Test
     public void testDefaultTmfTraceStub() {
         assertFalse ("Open trace", fTrace == null);
-        assertEquals("getType",  ITmfEvent.class, fTrace.getType());
+        assertEquals("getEventType",  ITmfEvent.class, fTrace.getEventType());
         assertNull  ("getResource", fTrace.getResource());
         assertEquals("getStreamingInterval", 0, fTrace.getStreamingInterval());
         assertEquals("getName", TEST_TRACE.getPath(), fTrace.getName());
This page took 0.027785 seconds and 5 git commands to generate.