1 /*******************************************************************************
2 * Copyright (c) 2010 Ericsson
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
10 * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12 package org
.eclipse
.linuxtools
.lttng
.control
;
16 import org
.eclipse
.linuxtools
.lttng
.LttngTestPreparation
;
17 import org
.eclipse
.linuxtools
.lttng
.event
.LttngSyntheticEvent
;
18 import org
.eclipse
.linuxtools
.tmf
.request
.TmfEventRequest
;
20 public class LTTngSyntheticEventProviderTextTest
extends LttngTestPreparation
{
22 // ========================================================================
24 // ========================================================================
28 // public void testPlainDataRequest() {
31 // TmfExperiment<LttngEvent> experiment = prepareTextExperimentToTest();
32 // TmfEventRequest<LttngEvent> request = prepareEventRequest(
33 // LttngEvent.class, 0, 31);
36 // experiment.sendRequest(request);
38 // request.waitForCompletion();
39 // } catch (InterruptedException e) {
40 // e.printStackTrace();
44 // assertEquals("Unexpected eventCount", 15316, feventCount);
45 // boolean expected = true;
46 // assertEquals("Events received out of expected order", expected,
53 public void testSyntheticEventRequest() {
55 // make sure a synthetic event provider exists and it's registered
56 LttngSyntheticEventProvider synProvider
= LttngCoreProviderFactory
59 // make sure a TmfExperiment instance is registered as provider and
60 // selected as current
61 prepareTextExperimentToTest();
63 // prepare synthetic event request
64 TmfEventRequest
<LttngSyntheticEvent
> request
= prepareEventRequest(
65 LttngSyntheticEvent
.class, 0, 31);
68 synProvider
.sendRequest(request
);
70 request
.waitForCompletion();
71 } catch (InterruptedException e
) {
76 assertEquals("Unexpected eventCount", 15316, feventCount
);