Commit | Line | Data |
---|---|---|
03c71d1e ASL |
1 | /******************************************************************************* |
2 | * Copyright (c) 2010 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 | package org.eclipse.linuxtools.lttng.control; | |
13 | ||
14 | import org.eclipse.linuxtools.lttng.LttngTestPreparation; | |
03c71d1e ASL |
15 | |
16 | public class LTTngSyntheticEventProviderTest extends LttngTestPreparation { | |
17 | // ======================================================================== | |
18 | // Tests | |
19 | // ======================================================================== | |
20 | ||
cb866e08 FC |
21 | // public void testPlainDataRequest() { |
22 | // // prepare | |
23 | // init(); | |
24 | // TmfExperiment<LttngEvent> experiment = prepareExperimentToTest(); | |
25 | // TmfEventRequest<LttngEvent> request = prepareEventRequest( | |
26 | // LttngEvent.class, 0, 31); | |
27 | // | |
28 | // // execute | |
29 | // experiment.sendRequest(request); | |
30 | // try { | |
31 | // request.waitForCompletion(); | |
32 | // } catch (InterruptedException e) { | |
33 | // e.printStackTrace(); | |
34 | // } | |
35 | // | |
36 | // // finish | |
37 | // assertEquals("Unexpected eventCount", 15316, feventCount); | |
38 | // boolean expected = true; | |
39 | // assertEquals("Events received out of expected order", expected, | |
40 | // validSequence); | |
41 | // } | |
42 | // | |
43 | // /** | |
44 | // * | |
45 | // */ | |
46 | // public void testSyntheticEventRequest() { | |
47 | // init(); | |
48 | // // Create a new Experiment manager context | |
49 | // IStateExperimentManager expManager = prepareExperimentContext(false); | |
50 | // | |
51 | // // make sure a TmfExperiment instance is registered as provider and | |
52 | // // selected as current | |
53 | // TmfExperiment<LttngEvent> experiment = prepareExperimentToTest(); | |
54 | // | |
55 | // // experiment selected, build experiment selection context and trigger | |
56 | // // check point creation | |
57 | // expManager.experimentSelected_prep(experiment); | |
58 | // // builds check points in parallel | |
59 | // expManager.experimentSelected(this, experiment); | |
60 | // | |
61 | // // Obtain the singleton event provider | |
62 | // LttngSyntheticEventProvider synProvider = LttngCoreProviderFactory | |
63 | // .getEventProvider(); | |
64 | // | |
65 | // // prepare synthetic event requests | |
66 | // boolean printExpectedEvents = false; | |
67 | // TmfEventRequest<LttngSyntheticEvent> request1 = prepareEventRequest(LttngSyntheticEvent.class, 5, 9, | |
68 | // printExpectedEvents); /* 2001 events */ | |
69 | // TmfEventRequest<LttngSyntheticEvent> request2 = prepareEventRequest(LttngSyntheticEvent.class, 11, 13, | |
70 | // printExpectedEvents); /* 1001 events */ | |
71 | // | |
72 | // // execute | |
73 | // synProvider.sendRequest(request1); | |
74 | // try { | |
75 | // request1.waitForCompletion(); | |
76 | // } catch (InterruptedException e) { | |
77 | // e.printStackTrace(); | |
78 | // } | |
79 | // | |
80 | // synProvider.sendRequest(request2); | |
81 | // try { | |
82 | // request2.waitForCompletion(); | |
83 | // } catch (InterruptedException e) { | |
84 | // e.printStackTrace(); | |
85 | // } | |
86 | // | |
87 | // // finish | |
88 | // assertEquals("Unexpected eventCount", 3002, feventCount); | |
89 | // } | |
03c71d1e ASL |
90 | |
91 | } |