Commit | Line | Data |
---|---|---|
03c71d1e ASL |
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 | ||
03c71d1e | 17 | import org.eclipse.linuxtools.lttng.trace.LTTngTrace; |
03c71d1e ASL |
18 | |
19 | /** | |
20 | * @author alvaro | |
21 | * | |
22 | */ | |
3b38ea61 | 23 | @SuppressWarnings("nls") |
03c71d1e | 24 | public class TestStateManager extends TestCase { |
550d787e FC |
25 | |
26 | /** | |
27 | * TODO: Not used for the time being, for experiment selection test cases | |
28 | * for package state.experiment | |
29 | */ | |
03c71d1e | 30 | public void testSetTraceSelection() { |
603e1b20 | 31 | String logName = "traceset/trace-15316events_nolost_newformat"; |
03c71d1e ASL |
32 | |
33 | LTTngTrace testStream = null; | |
34 | try { | |
c5b45b39 | 35 | testStream = new LTTngTrace(logName, false); |
03c71d1e | 36 | } catch (Exception e) { |
603e1b20 | 37 | // e.printStackTrace(); |
03c71d1e ASL |
38 | } |
39 | ||
40 | if (testStream != null) { | |
41 | LTTngTrace[] streamList = new LTTngTrace[1]; | |
42 | streamList[0] = testStream; | |
550d787e FC |
43 | // TmfExperiment<LttngEvent> newExp = new |
44 | // TmfExperiment<LttngEvent>(LttngEvent.class, logName, streamList); | |
03c71d1e ASL |
45 | |
46 | //Get the Test StateManager | |
550d787e FC |
47 | // IStateTraceManager manager = StateManagerFactoryTestSupport |
48 | // .getManager(testStream); | |
03c71d1e | 49 | //Start execution. |
550d787e FC |
50 | // manager.experimentUpdated(new TmfExperimentUpdatedSignal(this, |
51 | // newExp, null), true); | |
03c71d1e ASL |
52 | |
53 | //Print events not handled. | |
8827c197 FC |
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()); | |
03c71d1e ASL |
60 | } |
61 | } | |
62 | } |