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