Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2014-11-01 05:08:29 -0400
committerUwe Stieber2014-11-01 05:08:29 -0400
commit67b313a6527ef0dfadc063d7481dff06762763f6 (patch)
tree8b658d6dad60cf07edab650f6c55e18dd4c99fb9
parentdba160f23d2bd8aa85a0cf57e2ad3b86dbe1a275 (diff)
downloadorg.eclipse.tcf-67b313a6527ef0dfadc063d7481dff06762763f6.tar.gz
org.eclipse.tcf-67b313a6527ef0dfadc063d7481dff06762763f6.tar.xz
org.eclipse.tcf-67b313a6527ef0dfadc063d7481dff06762763f6.zip
Tests: Remove channel steps test
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/plugin.xml23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/steps/ValidateChannelStep.java49
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/suites/AllTests.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/tests/TcfStepperTests.java81
5 files changed, 1 insertions, 157 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF
index 627844aa0..845147dfc 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF
@@ -51,5 +51,4 @@ Export-Package: org.eclipse.tcf.te.tests,
org.eclipse.tcf.te.tests.tcf.filesystem.operations,
org.eclipse.tcf.te.tests.tcf.filesystem.testers,
org.eclipse.tcf.te.tests.tcf.filesystem.url,
- org.eclipse.tcf.te.tests.tcf.filesystem.utils,
- org.eclipse.tcf.te.tests.tcf.tests
+ org.eclipse.tcf.te.tests.tcf.filesystem.utils
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tests/plugin.xml
index ef21eb2d7..e0f66b2ec 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/plugin.xml
@@ -79,12 +79,6 @@
id="org.eclipse.tcf.te.tests.stepper.step5"
label="Test Step 5">
</step>
-
- <step
- class="org.eclipse.tcf.te.tests.stepper.steps.ValidateChannelStep"
- id="org.eclipse.tcf.te.tests.channelStepTests.validate"
- label="Validate Channel Step">
- </step>
</extension>
<extension point="org.eclipse.tcf.te.runtime.stepper.stepGroups">
@@ -193,23 +187,6 @@
</reference>
</references>
</stepGroup>
-
- <stepGroup
- id="org.eclipse.tcf.te.tests.channelStepTests"
- label="Test TCF Channel Steps"
- locked="true">
- <references>
- <reference
- id="org.eclipse.tcf.te.tcf.core.openChannelStep">
- </reference>
- <reference
- id="org.eclipse.tcf.te.tests.channelStepTests.validate">
- </reference>
- <reference
- id="org.eclipse.tcf.te.tcf.core.closeChannelStep">
- </reference>
- </references>
- </stepGroup>
</extension>
<!-- Test notifications contributions -->
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/steps/ValidateChannelStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/steps/ValidateChannelStep.java
deleted file mode 100644
index 2fa8bbb55..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/steps/ValidateChannelStep.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tests.stepper.steps;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.tcf.protocol.IChannel;
-import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tcf.te.runtime.stepper.StepperAttributeUtil;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext;
-import org.eclipse.tcf.te.runtime.stepper.steps.AbstractStep;
-import org.eclipse.tcf.te.tcf.core.interfaces.steps.ITcfStepAttributes;
-
-/**
- * Get the channel and validate that the channel is open
- */
-public class ValidateChannelStep extends AbstractStep {
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IExtendedStep#validateExecute(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- public void validateExecute(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStep#execute(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
- */
- @Override
- public void execute(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor, ICallback callback) {
- IChannel channel = (IChannel)StepperAttributeUtil.getProperty(ITcfStepAttributes.ATTR_CHANNEL, fullQualifiedId, data);
- data.setProperty(ITcfStepAttributes.ATTR_CHANNEL, channel);
- if (channel != null && channel.getState() == IChannel.STATE_OPEN) {
- data.setProperty("ValidateChannelStep.result", true); //$NON-NLS-1$
- }
- callback.done(this, Status.OK_STATUS);
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/suites/AllTests.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/suites/AllTests.java
index a0ee436ee..179834a24 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/suites/AllTests.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/suites/AllTests.java
@@ -21,7 +21,6 @@ import org.eclipse.tcf.te.tests.tcf.launch.TcfLaunchTests;
import org.eclipse.tcf.te.tests.tcf.locator.LocatorModelTestCase;
import org.eclipse.tcf.te.tests.tcf.processes.launcher.ProcessLauncherTestCase;
import org.eclipse.tcf.te.tests.tcf.processes.model.ProcessModelTestCase;
-import org.eclipse.tcf.te.tests.tcf.tests.TcfStepperTests;
import org.eclipse.tcf.te.tests.utils.UtilityTestCase;
/**
@@ -71,7 +70,6 @@ public class AllTests {
suite.addTest(LocatorModelTestCase.getTestSuite());
suite.addTest(StepperTests.getTestSuite());
- suite.addTest(TcfStepperTests.getTestSuite());
suite.addTest(TcfLaunchTests.getTestSuite());
suite.addTest(ProcessModelTestCase.getTestSuite());
suite.addTest(ProcessLauncherTestCase.getTestSuite());
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/tests/TcfStepperTests.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/tests/TcfStepperTests.java
deleted file mode 100644
index 9670edf91..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/tests/TcfStepperTests.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013, 2014 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tests.tcf.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.tcf.protocol.IChannel;
-import org.eclipse.tcf.te.runtime.concurrent.util.ExecutorsUtil;
-import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepper;
-import org.eclipse.tcf.te.runtime.stepper.stepper.Stepper;
-import org.eclipse.tcf.te.tcf.core.interfaces.steps.ITcfStepAttributes;
-import org.eclipse.tcf.te.tests.tcf.TcfTestCase;
-
-/**
- * TCF Stepper tests.
- */
-public class TcfStepperTests extends TcfTestCase {
-
- /**
- * Provides a test suite to the caller which combines all single
- * test bundled within this category.
- *
- * @return Test suite containing all test for this test category.
- */
- public static Test getTestSuite() {
- TestSuite testSuite = new TestSuite("TCF Stepper tests"); //$NON-NLS-1$
-
- // add ourself to the test suite
- testSuite.addTestSuite(TcfStepperTests.class);
-
- return testSuite;
- }
-
- public void testChannelSteps() {
- assertNotNull("Precondition Failure: peer model is not available.", peerNode); //$NON-NLS-1$
-
- final IStepper stepper = new Stepper("testExecuteStepGroup"); //$NON-NLS-1$
-
- IPropertiesContainer properties = new PropertiesContainer();
- IStepContext context = (IStepContext)Platform.getAdapterManager().getAdapter(peerNode, IStepContext.class);
- assertNotNull("Failed to get step context adapter for peer model.", context); //$NON-NLS-1$
-
- // Initialize the stepper
- stepper.initialize(context, "org.eclipse.tcf.te.tests.channelStepTests", properties, null); //$NON-NLS-1$
-
- ExecutorsUtil.execute(new Runnable() {
- @Override
- public void run() {
- // Execute
- try {
- stepper.execute();
- }
- catch (Exception e) {
- e.printStackTrace();
- assertNull("Unexpected exception when executing step group", e); //$NON-NLS-1$
- }
- }
- });
-
- // Wait for the stepper to be finished
- assertFalse("Timeout executing step group", ExecutorsUtil.waitAndExecute(0, new IStepper.ExecutionFinishedConditionTester(stepper))); //$NON-NLS-1$
-
- IChannel channel = (IChannel)properties.getProperty(ITcfStepAttributes.ATTR_CHANNEL);
- assertNotNull("Failed to create channel.", channel); //$NON-NLS-1$
- assertTrue("Failed to open channel.", properties.getBooleanProperty("ValidateChannelStep.result")); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Failed to close channel. Channel state = " + channel.getState(), channel.getState() == IChannel.STATE_CLOSED); //$NON-NLS-1$
- }
-
-}

Back to the top