| 1 | /******************************************************************************* |
| 2 | * Copyright (c) 2009 Ericsson |
| 3 | * |
| 4 | * All rights reserved. This program and the accompanying materials are |
| 5 | * made available under the terms of the Eclipse Public License v1.0 which |
| 6 | * accompanies this distribution, and is available at |
| 7 | * http://www.eclipse.org/legal/epl-v10.html |
| 8 | * |
| 9 | * Contributors: |
| 10 | * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation |
| 11 | *******************************************************************************/ |
| 12 | |
| 13 | package org.eclipse.linuxtools.lttng.tests.state; |
| 14 | |
| 15 | import junit.framework.TestCase; |
| 16 | |
| 17 | import org.eclipse.linuxtools.lttng.trace.LTTngTrace; |
| 18 | |
| 19 | /** |
| 20 | * @author alvaro |
| 21 | * |
| 22 | */ |
| 23 | @SuppressWarnings("nls") |
| 24 | public class TestStateManager extends TestCase { |
| 25 | |
| 26 | /** |
| 27 | * TODO: Not used for the time being, for experiment selection test cases |
| 28 | * for package state.experiment |
| 29 | */ |
| 30 | public void testSetTraceSelection() { |
| 31 | String logName = "traceset/trace-15316events_nolost_newformat"; |
| 32 | |
| 33 | // LTTngTrace testStream = null; |
| 34 | // try { |
| 35 | // testStream = new LTTngTrace(logName, true); |
| 36 | // } catch (Exception e) { |
| 37 | // e.printStackTrace(); |
| 38 | // } |
| 39 | // |
| 40 | // if (testStream != null) { |
| 41 | // LTTngTrace[] streamList = new LTTngTrace[1]; |
| 42 | // streamList[0] = testStream; |
| 43 | // TmfExperiment<LttngEvent> newExp = new |
| 44 | // TmfExperiment<LttngEvent>(LttngEvent.class, logName, streamList); |
| 45 | |
| 46 | //Get the Test StateManager |
| 47 | // IStateTraceManager manager = StateManagerFactoryTestSupport |
| 48 | // .getManager(testStream); |
| 49 | //Start execution. |
| 50 | // manager.experimentUpdated(new TmfExperimentUpdatedSignal(this, |
| 51 | // newExp, null), true); |
| 52 | |
| 53 | //Print events not handled. |
| 54 | // Set<String> notHandledEvents = manager.getEventsNotHandled(); |
| 55 | // StringBuilder sb = new StringBuilder(); |
| 56 | // for (String event : notHandledEvents) { |
| 57 | // sb.append("\n" + event); |
| 58 | // } |
| 59 | // TraceDebug.debug("Events not Handled: " + sb.toString()); |
| 60 | // } |
| 61 | } |
| 62 | } |