Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse')
-rw-r--r--tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/axis/tomcat/v50/perfmsr/PerfmsrBUJavaAxisTC50.java170
-rw-r--r--tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/axis/tomcat/v50/perfmsr/PerfmsrClientAxisTC50.java165
-rw-r--r--tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/axis/tomcat/v50/perfmsr/PerfmsrTDJavaAxisTC50.java156
-rw-r--r--tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/AllPerformanceTests.java51
-rw-r--r--tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/plugin/PerformancePlugin.java41
-rw-r--r--tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/util/EclipsePerformanceLog.java77
-rw-r--r--tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/util/PerformanceJUnitUtils.java55
-rw-r--r--tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/util/PerformanceJobUtil.java70
8 files changed, 0 insertions, 785 deletions
diff --git a/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/axis/tomcat/v50/perfmsr/PerfmsrBUJavaAxisTC50.java b/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/axis/tomcat/v50/perfmsr/PerfmsrBUJavaAxisTC50.java
deleted file mode 100644
index 8a69a85ee..000000000
--- a/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/axis/tomcat/v50/perfmsr/PerfmsrBUJavaAxisTC50.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation 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:
- * IBM Corporation - initial API and implementation
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * 20070502 185208 sengpl@ca.ibm.com - Seng Phung-Lu
- * 20070509 180567 sengpl@ca.ibm.com - Seng Phung-Lu
- * 20070705 195553 sengpl@ca.ibm.com - Seng Phung-Lu
- * 20080313 126774 sengpl@ca.ibm.com - Seng Phung-Lu
- * 20100507 312131 mahutch@ca.ibm.com - Mark Hutchinson, ws performance test JUnits can have inconsistent results due to background jobs running
- *******************************************************************************/
-package org.eclipse.jst.ws.tests.axis.tomcat.v50.perfmsr;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jst.ws.internal.common.J2EEUtils;
-import org.eclipse.jst.ws.internal.common.ResourceUtils;
-import org.eclipse.jst.ws.tests.axis.tomcat.v50.WSWizardTomcat50Test;
-import org.eclipse.jst.ws.tests.performance.util.PerformanceJUnitUtils;
-import org.eclipse.jst.ws.tests.performance.util.PerformanceJobUtil;
-import org.eclipse.jst.ws.tests.unittest.WSJUnitConstants;
-import org.eclipse.jst.ws.tests.util.JUnitUtils;
-import org.eclipse.jst.ws.tests.util.ScenarioConstants;
-import org.eclipse.test.performance.Performance;
-import org.eclipse.test.performance.PerformanceMeter;
-import org.eclipse.wst.command.internal.env.eclipse.AccumulateStatusHandler;
-
-/**
- * Bottom up performance scenario with Axis and Tomcat v5.0
- */
-public final class PerfmsrBUJavaAxisTC50 extends WSWizardTomcat50Test {
- // Constants
- private final String WS_RUNTIMEID_AXIS = WSJUnitConstants.WS_RUNTIMEID_AXIS;
- private final String PROJECT_NAME = WSJUnitConstants.BU_PROJECT_NAME;
-
- private IFile sourceFile_;
-
- /**
- * Sets up the input data;
- * - create project(s),
- * - copy resources to work space
- */
- protected void installInputData() throws Exception
- {
-
- IProject webProject = ProjectUtilities.getProject(PROJECT_NAME);
- IPath destPath = ResourceUtils.getJavaSourceLocation(webProject);
- IFolder folder = (IFolder)ResourceUtils.findResource(destPath);
- JUnitUtils.copyTestData("BUJava/src",folder,env_, null);
- sourceFile_ = folder.getFile(new Path("foo/Echo.java"));
- // Ensure that Echo.class is built in:
- // <Web Project>/WebContent/WEB-INF/classes/foo/Echo.class
- JUnitUtils.disableValidation(webProject);
- JUnitUtils.syncBuildProject(webProject,env_, null);
-
- }
-
- protected void createProjects() throws Exception{
- IProject webProject = ProjectUtilities.getProject(PROJECT_NAME);
- if (webProject==null || !webProject.exists()){
- JUnitUtils.createWebModule(PROJECT_NAME, PROJECT_NAME, server_.getId(), SERVERTYPEID_TC50, "14", env_, new NullProgressMonitor());
- }
- }
-
- /**
- * Set the persistent server runtime context preferences
- */
- protected void initJ2EEWSRuntimeServerDefaults() throws Exception
- {
- // Set default preferences for Axis and Tomcat 5.0
- JUnitUtils.setWSRuntimeServer(WS_RUNTIMEID_AXIS, SERVERTYPEID_TC50);
- JUnitUtils.setServiceScenarioDefault();
- }
-
- /**
- * Set the initial selection
- */
- protected void initInitialSelection() throws Exception
- {
- initialSelection_ = new StructuredSelection(sourceFile_);
- }
-
- /**
- * Launches the pop-up command to initiate the scenario
- * @throws Exception
- */
- public void testBUJavaAxisTC50() throws Exception
- {
- PerformanceJobUtil.waitForStartupJobs();
-
- IStatus[] status;
- IProject webProject = ProjectUtilities.getProject(PROJECT_NAME);
- JUnitUtils.disableWSIDialog(webProject);
- JUnitUtils.enableOverwrite(true);
- JUnitUtils.setRuntimePreference("org.eclipse.jst.ws.axis.creation.axisWebServiceRT");
-
-
- Performance perf= Performance.getDefault();
- PerformanceMeter performanceMeter= perf.createPerformanceMeter(perf.getDefaultScenarioId(this));
- try {
-
- performanceMeter.start();
- status = PerformanceJUnitUtils.launchCreationWizard(ScenarioConstants.WIZARDID_BOTTOM_UP,ScenarioConstants.OBJECT_CLASS_ID_IFILE,initialSelection_);
- performanceMeter.stop();
-
- performanceMeter.commit();
- perf.assertPerformance(performanceMeter);
- }
- finally {
- if (performanceMeter==null)
- performanceMeter.dispose();
- }
-
- verifyOutput(status);
-
- }
-
- /**
- * Verify the scenario completed successfully
- * @throws Exception
- */
- private final void verifyOutput(IStatus[] status) throws Exception
- {
- IProject webProject = ProjectUtilities.getProject(PROJECT_NAME);
- IFolder webContentFolder = (IFolder)J2EEUtils.getWebContentContainer(webProject);
-
- IFolder wsdlFolder = webContentFolder.getFolder("wsdl");
- assertTrue(wsdlFolder.exists());
- assertTrue(wsdlFolder.members().length > 0);
- assertTrue(webContentFolder.getFolder("wsdl").members().length > 0);
-
- AccumulateStatusHandler statusHandler = new AccumulateStatusHandler(status);
- IStatus[] s = statusHandler.getErrorReports();
- //show errors
- if (s.length > 0){
- for (int i=0;i<s.length;i++){
- System.out.println("BUJava Error message for report #"+i+": "+s[i].getMessage());
- }
- }
- assertTrue(s.length == 0);
- }
-
- /**
- * Clear workspace if necessary
- */
- protected void deleteInputData() throws Exception
- {
- // Remove the EAR from the server.
- IProject webProject = ProjectUtilities.getProject(PROJECT_NAME);
- //JUnitUtils.removeModuleFromServer(server_,webProject,env_);
-
- // Delete the Web project.
- webProject.delete(true,true, null);
- assertFalse(webProject.exists());
-
- }
-}
diff --git a/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/axis/tomcat/v50/perfmsr/PerfmsrClientAxisTC50.java b/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/axis/tomcat/v50/perfmsr/PerfmsrClientAxisTC50.java
deleted file mode 100644
index 0b0889d4f..000000000
--- a/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/axis/tomcat/v50/perfmsr/PerfmsrClientAxisTC50.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation 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:
- * IBM Corporation - initial API and implementation
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * 20070502 185208 sengpl@ca.ibm.com - Seng Phung-Lu
- * 20070509 180567 sengpl@ca.ibm.com - Seng Phung-Lu
- * 20070705 195553 sengpl@ca.ibm.com - Seng Phung-Lu
- * 20080313 126774 sengpl@ca.ibm.com - Seng Phung-Lu
- * 20100507 312131 mahutch@ca.ibm.com - Mark Hutchinson, ws performance test JUnits can have inconsistent results due to background jobs running
- *******************************************************************************/
-package org.eclipse.jst.ws.tests.axis.tomcat.v50.perfmsr;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jst.ws.internal.common.J2EEUtils;
-import org.eclipse.jst.ws.internal.common.ResourceUtils;
-import org.eclipse.jst.ws.tests.axis.tomcat.v50.WSWizardTomcat50Test;
-import org.eclipse.jst.ws.tests.performance.util.PerformanceJUnitUtils;
-import org.eclipse.jst.ws.tests.performance.util.PerformanceJobUtil;
-import org.eclipse.jst.ws.tests.unittest.WSJUnitConstants;
-import org.eclipse.jst.ws.tests.util.JUnitUtils;
-import org.eclipse.jst.ws.tests.util.ScenarioConstants;
-import org.eclipse.test.performance.Performance;
-import org.eclipse.test.performance.PerformanceMeter;
-import org.eclipse.wst.command.internal.env.eclipse.AccumulateStatusHandler;
-
-/**
- * Client performance scenario with Axis and Tomcat v5.0
- */
-public class PerfmsrClientAxisTC50 extends WSWizardTomcat50Test {
-
- private final String WS_RUNTIMEID_AXIS = WSJUnitConstants.WS_RUNTIMEID_AXIS;
-
- private final String CLIENT_PROJECT_NAME = WSJUnitConstants.CLIENT_PROJECT_NAME;
-
- private IFile sourceFile_;
-
- protected void createProjects() throws Exception{
- IProject webProject = ProjectUtilities.getProject(CLIENT_PROJECT_NAME);
- if (!webProject.exists()){
- JUnitUtils.createWebModule(CLIENT_PROJECT_NAME, CLIENT_PROJECT_NAME, server_.getId(),SERVERTYPEID_TC50, "14", env_, new NullProgressMonitor());
- }
- }
-
-
- /**
- * Sets up the input data;
- * - create project(s),
- * - copy resources to workspace
- */
- protected void installInputData() throws Exception {
-
-
- IProject webProject = ProjectUtilities.getProject(CLIENT_PROJECT_NAME);
- IFolder destFolder = (IFolder)J2EEUtils.getWebContentContainer(webProject);
- JUnitUtils.copyTestData("TDJava",destFolder,env_, null);
- sourceFile_ = destFolder.getFile(new Path("Echo.wsdl"));
-
- JUnitUtils.disableValidation(webProject);
- JUnitUtils.syncBuildProject(webProject,env_, null);
-
- }
-
- /**
- * Set the persistent server runtime context preferences
- */
- protected void initJ2EEWSRuntimeServerDefaults() throws Exception {
- // Set default preferences for Axis and Tomcat 5.0
- JUnitUtils.setWSRuntimeServer(WS_RUNTIMEID_AXIS, SERVERTYPEID_TC50);
- JUnitUtils.setClientScenarioDefault();
- }
-
- /**
- * Set the initial selection
- */
- protected void initInitialSelection() throws Exception {
- initialSelection_ = new StructuredSelection(sourceFile_);
- }
-
- /**
- * Launches the pop-up command to initiate the scenario
- * @throws Exception
- */
- public void testClientAxisTC50() throws Exception
- {
- PerformanceJobUtil.waitForStartupJobs();
- IStatus[] status;
-
- JUnitUtils.enableProxyGeneration(true);
- JUnitUtils.enableOverwrite(true);
- JUnitUtils.setRuntimePreference("org.eclipse.jst.ws.axis.creation.axisWebServiceRT");
-
- Performance perf= Performance.getDefault();
- PerformanceMeter performanceMeter= perf.createPerformanceMeter(perf.getDefaultScenarioId(this));
- try {
-
- performanceMeter.start();
- status = PerformanceJUnitUtils.launchCreationWizard(ScenarioConstants.WIZARDID_CLIENT,ScenarioConstants.OBJECT_CLASS_ID_IFILE,initialSelection_);
- performanceMeter.stop();
- performanceMeter.commit();
- perf.assertPerformance(performanceMeter);
- }
- finally {
- if (performanceMeter==null)
- performanceMeter.dispose();
- }
-
- verifyOutput(status);
-
-
- }
-
- /**
- * Verify the scenario completed succesfully
- * @throws Exception
- */
- private final void verifyOutput(IStatus[] status) throws Exception {
- IProject webProject = ProjectUtilities.getProject(CLIENT_PROJECT_NAME);
-
- IPath destPath = ResourceUtils.getJavaSourceLocation(webProject);
- IFolder srcFolder = (IFolder)ResourceUtils.findResource(destPath);
-
- //IFolder srcFolder = JUnitUtils.getSourceFolderForWebProject(CLIENT_PROJECT_NAME);
- IFolder folder = srcFolder.getFolder("foo");
- assertTrue(folder.exists());
- assertTrue(folder.members().length > 0);
-
- AccumulateStatusHandler statusHandler = new AccumulateStatusHandler(status);
- IStatus[] s = statusHandler.getErrorReports();
- //
- if (s.length > 0){
- for (int i=0;i<s.length;i++){
- System.out.println("Error message for report #"+i+": "+s[i].getMessage());
- }
- }
- assertTrue(s.length == 0);
-
- }
-
- /**
- * Remove workspace if necessary
- */
- protected void deleteInputData() throws Exception {
-
- // Delete the Web project.
- IProject webProject = ProjectUtilities.getProject(CLIENT_PROJECT_NAME);
- webProject.delete(true,true, null);
-
- }
-
-}
diff --git a/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/axis/tomcat/v50/perfmsr/PerfmsrTDJavaAxisTC50.java b/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/axis/tomcat/v50/perfmsr/PerfmsrTDJavaAxisTC50.java
deleted file mode 100644
index da7f62c69..000000000
--- a/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/axis/tomcat/v50/perfmsr/PerfmsrTDJavaAxisTC50.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation 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:
- * IBM Corporation - initial API and implementation
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * 20070502 185208 sengpl@ca.ibm.com - Seng Phung-Lu
- * 20070509 180567 sengpl@ca.ibm.com - Seng Phung-Lu
- * 20070705 195553 sengpl@ca.ibm.com - Seng Phung-Lu
- * 20080313 126774 sengpl@ca.ibm.com - Seng Phung-Lu
- * 20100507 312131 mahutch@ca.ibm.com - Mark Hutchinson, ws performance test JUnits can have inconsistent results due to background jobs running
- *******************************************************************************/
-package org.eclipse.jst.ws.tests.axis.tomcat.v50.perfmsr;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jst.ws.internal.common.J2EEUtils;
-import org.eclipse.jst.ws.tests.axis.tomcat.v50.WSWizardTomcat50Test;
-import org.eclipse.jst.ws.tests.performance.util.PerformanceJUnitUtils;
-import org.eclipse.jst.ws.tests.performance.util.PerformanceJobUtil;
-import org.eclipse.jst.ws.tests.unittest.WSJUnitConstants;
-import org.eclipse.jst.ws.tests.util.JUnitUtils;
-import org.eclipse.jst.ws.tests.util.ScenarioConstants;
-import org.eclipse.test.performance.Performance;
-import org.eclipse.test.performance.PerformanceMeter;
-import org.eclipse.wst.command.internal.env.eclipse.AccumulateStatusHandler;
-
-/**
- * Top down performance scenario with Axis and Tomcat v5.0
- */
-public class PerfmsrTDJavaAxisTC50 extends WSWizardTomcat50Test {
-
- private final String WS_RUNTIMEID_AXIS = WSJUnitConstants.WS_RUNTIMEID_AXIS;
-
- private final String PROJECT_NAME = WSJUnitConstants.TD_PROJECT_NAME;
-
- private IFile sourceFile_;
-
- protected void createProjects() throws Exception{
- IProject webProject = ProjectUtilities.getProject(PROJECT_NAME);
- if (!webProject.exists()){
- JUnitUtils.createWebModule(PROJECT_NAME, PROJECT_NAME, server_.getId(), SERVERTYPEID_TC50, "14", env_, new NullProgressMonitor());
- }
- }
-
-
- /**
- * Sets up the input data;
- * - create project(s),
- * - copy resources to workspace
- */
- protected void installInputData() throws Exception {
-
- IProject webProject = ProjectUtilities.getProject(PROJECT_NAME);
- IFolder destFolder = (IFolder)J2EEUtils.getWebContentContainer(webProject);
- JUnitUtils.copyTestData("TDJava",destFolder,env_, null);
- sourceFile_ = destFolder.getFile(new Path("Echo.wsdl"));
-
- JUnitUtils.disableValidation(webProject);
- JUnitUtils.syncBuildProject(webProject,env_, null);
- }
-
- /**
- * Set the persistent server runtime context preferences
- */
- protected void initJ2EEWSRuntimeServerDefaults() throws Exception {
- // Set default preferences for Axis and Tomcat v5.0 server
- JUnitUtils.setWSRuntimeServer(WS_RUNTIMEID_AXIS, SERVERTYPEID_TC50);
- JUnitUtils.setServiceScenarioDefault();
- }
-
- /**
- * Set the initial selection
- */
- protected void initInitialSelection() throws Exception {
- initialSelection_ = new StructuredSelection(sourceFile_);
-
- }
-
- /**
- * Launches the pop-up command to initiate the scenario
- * @throws Exception
- */
- public void testTDJavaAxisTC50() throws Exception {
- PerformanceJobUtil.waitForStartupJobs();
- IStatus[] status;
- JUnitUtils.enableOverwrite(true);
- JUnitUtils.setRuntimePreference("org.eclipse.jst.ws.axis.creation.axisWebServiceRT");
-
- Performance perf= Performance.getDefault();
- PerformanceMeter performanceMeter= perf.createPerformanceMeter(perf.getDefaultScenarioId(this));
- try {
-
- performanceMeter.start();
- status = PerformanceJUnitUtils.launchCreationWizard(ScenarioConstants.WIZARDID_TOP_DOWN,ScenarioConstants.OBJECT_CLASS_ID_IFILE,initialSelection_);
- performanceMeter.stop();
- performanceMeter.commit();
- perf.assertPerformance(performanceMeter);
- }
- finally {
- if (performanceMeter==null)
- performanceMeter.dispose();
- }
-
- verifyOutput(status);
-
-
- }
-
- /**
- * Verify the scenario completed successfully
- * @throws Exception
- */
- private final void verifyOutput(IStatus[] status) throws Exception
- {
- IProject webProject = ProjectUtilities.getProject(PROJECT_NAME);
- IFolder webContentFolder = (IFolder)J2EEUtils.getWebContentContainer(webProject);
-
-
- IFolder wsdlFolder = webContentFolder.getFolder("wsdl");
- assertTrue(wsdlFolder.exists());
- assertTrue(wsdlFolder.members().length > 0);
-
- AccumulateStatusHandler statusHandler = new AccumulateStatusHandler(status);
- IStatus[] s = statusHandler.getErrorReports();
- //
- if (s.length > 0){
- for (int i=0;i<s.length;i++){
- System.out.println("TDJava Error message for report #"+i+": "+s[i].getMessage());
- }
- }
- assertTrue(s.length == 0);
- }
-
- /**
- * Clear workspace if required
- */
- protected void deleteInputData() throws Exception {
- // Delete the Web project.
- IProject webProject = ProjectUtilities.getProject(PROJECT_NAME);
- webProject.delete(true,true,null);
-
- }
-
-}
diff --git a/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/AllPerformanceTests.java b/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/AllPerformanceTests.java
deleted file mode 100644
index f20bb189c..000000000
--- a/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/AllPerformanceTests.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation 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:
- * IBM Corporation - initial API and implementation
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * 20070502 185208 sengpl@ca.ibm.com - Seng Phung-Lu
- * 20080313 126774 sengpl@ca.ibm.com - Seng Phung-Lu
- * 20090402 263873 mahutch@ca.ibm.com - Mark Hutchinson, Move Axis2 peformance tests to new plugin
- *******************************************************************************/
-package org.eclipse.jst.ws.tests.performance;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.jst.ws.tests.axis.tomcat.v50.perfmsr.PerfmsrBUJavaAxisTC50;
-import org.eclipse.jst.ws.tests.axis.tomcat.v50.perfmsr.PerfmsrClientAxisTC50;
-import org.eclipse.jst.ws.tests.axis.tomcat.v50.perfmsr.PerfmsrTDJavaAxisTC50;
-
-public class AllPerformanceTests {
-
- public static Test suite() {
-
- TestSuite suite = new TestSuite("Test for org.eclipse.jst.ws.tests.performance");
- //$JUnit-BEGIN$
-
- // Check for Tomcat 5.0 server
- String s = System.getProperty("org.eclipse.jst.server.tomcat.50");
- if (s==null){
- s = System.getProperty("tomcat50Dir");
- }
-
- if (s != null && s.length() > 0) {
- suite.addTestSuite(PerfmsrBUJavaAxisTC50.class);
- suite.addTestSuite(PerfmsrTDJavaAxisTC50.class);
- suite.addTestSuite(PerfmsrClientAxisTC50.class);
- } else {
- System.err.println("Warning: Tomcat 5.0 not found - performance tests skipped");
- }
-
-
-
- //$JUnit-END$
- return suite;
- }
-}
diff --git a/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/plugin/PerformancePlugin.java b/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/plugin/PerformancePlugin.java
deleted file mode 100644
index c8262b41c..000000000
--- a/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/plugin/PerformancePlugin.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation 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:
- * IBM Corporation - initial API and implementation
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * 20070502 185208 sengpl@ca.ibm.com - Seng Phung-Lu
- *******************************************************************************/
-package org.eclipse.jst.ws.tests.performance.plugin;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class PerformancePlugin extends AbstractUIPlugin {
- //The shared instance.
- private static PerformancePlugin plugin;
-
-
- /**
- * The constructor.
- */
- public PerformancePlugin() {
- super();
- plugin = this;
- }
-
- /**
- * Returns the shared instance.
- */
- public static PerformancePlugin getDefault() {
- return plugin;
- }
-
-}
diff --git a/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/util/EclipsePerformanceLog.java b/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/util/EclipsePerformanceLog.java
deleted file mode 100644
index f48f1a3a4..000000000
--- a/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/util/EclipsePerformanceLog.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.jst.ws.tests.performance.util;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.test.performance.Performance;
-import org.eclipse.test.performance.PerformanceMeter;
-import org.eclipse.wst.common.environment.ILog;
-
-
-public class EclipsePerformanceLog implements ILog {
-
- private boolean runState = false;
- Performance perf = null;
- PerformanceMeter performanceMeter= null;
-
- public boolean isEnabled() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean isEnabled(String option) {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void log(int severity, int messageNum, Object caller, String method, Throwable throwable) {
- // TODO Auto-generated method stub
-
- }
-
- public void log(int severity, String option, int messageNum, Object caller, String method, Throwable throwable) {
- // TODO Auto-generated method stub
-
- }
-
- public void log(int severity, int messageNum, Object caller, String method, IStatus status) {
- // TODO Auto-generated method stub
-
- }
-
- public void log(int severity, String option, int messageNum, Object caller, String method, IStatus status) {
- // TODO Auto-generated method stub
-
- }
-
- public void log(int severity, int messageNum, Object caller, String method, Object object) {
- // TODO Auto-generated method stub
-
- }
-
- public void log(int severity, String option, int messageNum, Object caller, String method, Object object) {
-
- if (method.equals("runCommand")) {
-
- try {
- if (!runState) {
- // begin performance recording
- perf = Performance.getDefault();
- performanceMeter = perf.createPerformanceMeter(((String)object).toString());
- performanceMeter.start();
- runState = true;
- }
- else {
- // end performance recording
- performanceMeter.stop();
- performanceMeter.commit();
- perf.assertPerformance(performanceMeter);
- performanceMeter.dispose();
- runState = false;
- }
- }
- catch(Exception e) {
- // handle exception
- }
- }
- }
-
-}
diff --git a/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/util/PerformanceJUnitUtils.java b/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/util/PerformanceJUnitUtils.java
deleted file mode 100644
index ddd381ba2..000000000
--- a/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/util/PerformanceJUnitUtils.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation 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:
- * IBM Corporation - initial API and implementation
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * 20070321 176886 pmoogk@ca.ibm.com - Peter Moogk
- * 20070509 180567 sengpl@ca.ibm.com - Seng Phung-Lu
- *******************************************************************************/
-package org.eclipse.jst.ws.tests.performance.util;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.ws.tests.util.DynamicPopupJUnitWizard;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.command.internal.env.eclipse.AccumulateStatusHandler;
-
-
-public class PerformanceJUnitUtils {
-
- private static IStatus[] launchWizard(String pluginNS,String wizardId,String objectClassId,IStructuredSelection initialSelection) throws Exception
- {
- AccumulateStatusHandler statusHandler = new AccumulateStatusHandler();
-
- DynamicPopupJUnitWizard wizard = new DynamicPopupJUnitWizard(statusHandler);
- wizard.setInitialData(wizardId);
- ProgressMonitorDialog monitor = new ProgressMonitorDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- try {
- wizard.runHeadLess(initialSelection, monitor);
- }
- catch (Exception e){
- e.printStackTrace();
- }
-
- return statusHandler.getAllReports();
-
- }
-
- public static IStatus[] launchCreationWizard(String wizardId,String objectClassId,IStructuredSelection initialSelection) throws Exception
- {
- return launchWizard("org.eclipse.jst.ws.creation.ui",wizardId,objectClassId,initialSelection);
- }
-
- public static IStatus[] launchConsumptionWizard(String wizardId,String objectClassId,IStructuredSelection initialSelection) throws Exception
- {
- return launchWizard("org.eclipse.jst.ws.internal.consumption.ui",wizardId,objectClassId,initialSelection);
- }
-
-}
diff --git a/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/util/PerformanceJobUtil.java b/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/util/PerformanceJobUtil.java
deleted file mode 100644
index 8d553e93f..000000000
--- a/tests/org.eclipse.jst.ws.tests.performance/src/org/eclipse/jst/ws/tests/performance/util/PerformanceJobUtil.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation 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:
- * IBM Corporation - initial API and implementation
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * 20100507 312131 mahutch@ca.ibm.com - Mark Hutchinson, ws performance test JUnits can have inconsistent results due to background jobs running
- *******************************************************************************/
-
-package org.eclipse.jst.ws.tests.performance.util;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.runtime.jobs.Job;
-
-public final class PerformanceJobUtil {
-
- private static List<Job> getRunningJobs() {
- List<Job> jobs = new ArrayList<Job>();
- jobs.addAll(Arrays.asList(Job.getJobManager().find(null)));
- return jobs;
- }
-
- public static void waitForStartupJobs() {
- if (System.getProperty("ws.perf.startup.nowait") != null ) {
- System.out.println("ws.perf.startup.nowait property was set. Not waiting for start up jobs");
- return;
- }
- System.out.println("waiting up jobs to complete. Set the ws.perf.startup.nowait vm arg to skip this wait");
- try {
- waitForJobs();
- Thread.sleep(2000);//sleep for approx 2 more seconds
- }
- catch (InterruptedException e) {
- return;
- }
- }
-
- /* If there are jobs running, then sleep 2s.
- * Give up waiting if still jobs running after 60 iterations (approx 2 min)
- */
- private static void waitForJobs() throws InterruptedException {
- List<Job> jobs = getRunningJobs();
- int counter = 0;
- while (!jobs.isEmpty()) {
-
- String[] jobNames = new String[jobs.size()];
- for (int i = 0; i < jobs.size(); i++) {
- jobNames[i] = jobs.get(i).getName();
- }
- System.out.println("Waiting for " + jobs.size() + " jobs: " + Arrays.toString(jobNames));
- Thread.sleep(2000);
- jobs = getRunningJobs();
- counter++;
- if (counter == 60) {
- System.out.println("Giving up waiting after 2 minutes. Still " + jobs.size() + " jobs running: " + Arrays.toString(jobNames));
- break;
- }
- }
- }
-
-
-}

Back to the top