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 | *******************************************************************************/ | |
29465de6 | 12 | package org.eclipse.linuxtools.lttng.tests.control; |
03c71d1e | 13 | |
29465de6 | 14 | import org.eclipse.linuxtools.lttng.tests.LttngTestPreparation; |
03c71d1e | 15 | |
3b38ea61 | 16 | @SuppressWarnings("nls") |
03c71d1e ASL |
17 | public class LTTngSyntheticEventProviderTest extends LttngTestPreparation { |
18 | // ======================================================================== | |
19 | // Tests | |
20 | // ======================================================================== | |
21 | ||
3d62f8b7 | 22 | public void testPlainDataRequest() { |
603e1b20 FC |
23 | System.out.println("testPlainDataRequest: test removed"); |
24 | // // prepare | |
25 | // init(); | |
26 | // TmfExperiment<LttngEvent> experiment = prepareExperimentToTest(); | |
27 | // TmfEventRequest<LttngEvent> request = prepareEventRequest( | |
28 | // LttngEvent.class, 0, 31); | |
29 | // | |
30 | // // execute | |
31 | // experiment.sendRequest(request); | |
32 | // try { | |
33 | // request.waitForCompletion(); | |
34 | // } catch (InterruptedException e) { | |
35 | // e.printStackTrace(); | |
36 | // } | |
37 | // | |
38 | // // finish | |
39 | // assertEquals("Unexpected eventCount", 15316, feventCount); | |
40 | // boolean expected = true; | |
41 | // assertEquals("Events received out of expected order", expected, | |
42 | // validSequence); | |
3d62f8b7 | 43 | } |
9b635e61 | 44 | |
603e1b20 FC |
45 | public void testSyntheticEventRequest() { |
46 | System.out.println("testSyntheticEventRequest: test removed"); | |
f6b14ce2 FC |
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 | |
f9673903 FC |
62 | // LttngSyntheticEventProvider synProvider = LttngCoreProviderFactory |
63 | // .getEventProvider(); | |
f6b14ce2 FC |
64 | // |
65 | // // prepare synthetic event requests | |
66 | // boolean printExpectedEvents = false; | |
67 | // TmfEventRequest<LttngSyntheticEvent> request1 = prepareEventRequest(LttngSyntheticEvent.class, 5, 9, | |
68 | // printExpectedEvents); /* 2001 events */ | |
f9673903 | 69 | // TmfEventRequest<LttngSyntheticEvent> request2 = prepareEventRequest(LttngSyntheticEvent.class, 11, 13, |
f6b14ce2 FC |
70 | // printExpectedEvents); /* 1001 events */ |
71 | // | |
72 | // // execute | |
73 | // synProvider.sendRequest(request1); | |
f6b14ce2 FC |
74 | // try { |
75 | // request1.waitForCompletion(); | |
76 | // } catch (InterruptedException e) { | |
77 | // e.printStackTrace(); | |
78 | // } | |
f9673903 | 79 | // System.out.println("EventCount " + feventCount); |
f6b14ce2 FC |
80 | // |
81 | // synProvider.sendRequest(request2); | |
f6b14ce2 FC |
82 | // try { |
83 | // request2.waitForCompletion(); | |
84 | // } catch (InterruptedException e) { | |
85 | // e.printStackTrace(); | |
86 | // } | |
f9673903 | 87 | // System.out.println("EventCount " + feventCount); |
f6b14ce2 FC |
88 | // |
89 | // // finish | |
90 | // assertEquals("Unexpected eventCount", 3002, feventCount); | |
603e1b20 | 91 | } |
03c71d1e ASL |
92 | |
93 | } |