Move the "LTTng control" to separate packages
[lttng-ust-java-tests.git] / src / test / java / org / lttng / ust / agent / integration / EnabledEventsTestBase.java
index a47520c25adddca852e504549bd168349788a075..a04057ad4c2d329c7c6f1809e4393ef3a2658f7b 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2015, EfficiOS Inc., Alexandre Montplaisir <alexmonthy@efficios.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
 package org.lttng.ust.agent.integration;
 
 import static org.junit.Assert.assertEquals;
@@ -9,10 +27,17 @@ import java.util.List;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.lttng.tools.ILttngSession;
+import org.lttng.tools.ILttngSession.Domain;
 import org.lttng.ust.agent.ILttngHandler;
-import org.lttng.ust.agent.utils.LttngSession;
-import org.lttng.ust.agent.utils.LttngSession.Domain;
+import org.lttng.ust.agent.utils.TestPrintRunner;
 
+/**
+ * Base abstract class to implement all sorts of integration tests verifying the
+ * presence of enabled events in resulting traces.
+ */
+@RunWith(TestPrintRunner.class)
 public abstract class EnabledEventsTestBase {
 
     protected static final String EVENT_NAME_A = "EventA";
@@ -20,7 +45,7 @@ public abstract class EnabledEventsTestBase {
     protected static final String EVENT_NAME_C = "EventABC";
     protected static final String EVENT_NAME_D = "EventABCD";
 
-    private LttngSession session;
+    private ILttngSession session;
 
     /* Fields defined by the sub-class */
     protected ILttngHandler handlerA;
@@ -31,11 +56,17 @@ public abstract class EnabledEventsTestBase {
 
     protected abstract void sendEventsToLoggers();
 
+    /**
+     * Base test setup
+     */
     @Before
     public void testSetup() {
-        session = new LttngSession(null, getDomain());
+        session = ILttngSession.newCommandLineSession(null, getDomain());
     }
 
+    /**
+     * Base test teardown
+     */
     @After
     public void testTeardown() {
         session.close();
This page took 0.025056 seconds and 4 git commands to generate.