JBoss Tools SVN: r18584 - trunk/common/releng/hudson.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-11-10 16:43:46 -0500 (Tue, 10 Nov 2009)
New Revision: 18584
Modified:
trunk/common/releng/hudson/run.sh
Log:
workaround for https://jira.jboss.org/jira/browse/JBQA-2751 - find x86_64 jvms on 64-bit hudson slaves
Modified: trunk/common/releng/hudson/run.sh
===================================================================
--- trunk/common/releng/hudson/run.sh 2009-11-10 21:04:56 UTC (rev 18583)
+++ trunk/common/releng/hudson/run.sh 2009-11-10 21:43:46 UTC (rev 18584)
@@ -19,7 +19,7 @@
##############################################################################################
-uname -a
+uname=$(uname -a); echo $uname
if [[ -f $HUDSON_CONFIG_DIR/scripts/common/common_bash.sh ]]; then
. $HUDSON_CONFIG_DIR/scripts/common/common_bash.sh
setant 171
@@ -30,9 +30,17 @@
fi
export JAVA14
-export JAVA15
-export JAVA16
+if [[ ${uname/x86_64/} != $uname ]]; then
+ # 64-bit - must search for the 64-bit JVMs because common_bash.sh fails to load them from ~/config_repository/resources/common.variables
+ export JAVA15=$(find /qa/tools/opt/x86_64 -maxdepth 2 -name "jdk1.5.*" -type d -not -name "*beta*"| sort | tail -1)
+ export JAVA16=$(find /qa/tools/opt/x86_64 -maxdepth 2 -name "jdk1.6.*" -type d -not -name "*beta*"| sort | tail -1)
+else
+ # 32-bit - values defined in ~/config_repository/resources/common.variables
+ export JAVA15
+ export JAVA16
+fi
+
# cache of downloaded requirements and other binaries
downloadsDir="${WORKSPACE}/downloads"; if [[ ! -d $downloadsDir ]]; then mkdir -p $downloadsDir; fi
15 years, 1 month
JBoss Tools SVN: r18583 - in trunk/jmx/tests/org.jboss.tools.jmx.core.test: src/org/jboss/tools/jmx/core and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-11-10 16:04:56 -0500 (Tue, 10 Nov 2009)
New Revision: 18583
Added:
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/DefaultProviderTest.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/JMXCoreAllTests.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/JMXTestPlugin.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/MockConnectionWrapper.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/NodeBuilderTestCase.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/util/
Removed:
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/DefaultProviderTest.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/JMXCoreAllTests.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/JMXTestPlugin.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/MockConnectionWrapper.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/NodeBuilderTestCase.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/util/
Modified:
trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/util/FileUtil.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/util/TestProjectProvider.java
Log:
JBIDE-5180 test issue, rename package
Modified: trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF 2009-11-10 21:03:29 UTC (rev 18582)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF 2009-11-10 21:04:56 UTC (rev 18583)
@@ -3,7 +3,7 @@
Bundle-Name: %BundleName
Bundle-SymbolicName: org.jboss.tools.jmx.core.test
Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.jboss.tools.jmx.core.tests.JMXTestPlugin
+Bundle-Activator: org.jboss.tools.jmx.core.test.JMXTestPlugin
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: %BundleProvider
@@ -14,7 +14,7 @@
org.eclipse.debug.core,
org.eclipse.jdt.launching,
org.jboss.tools.tests
-Export-Package: org.jboss.tools.jmx.core.tests,
- org.jboss.tools.jmx.core.tests.util
+Export-Package: org.jboss.tools.jmx.core.test,
+ org.jboss.tools.jmx.core.test.util
Bundle-ClassPath: .
Import-Package: org.jboss.tools.jmx.core
Copied: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/DefaultProviderTest.java (from rev 18575, trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/DefaultProviderTest.java)
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/DefaultProviderTest.java (rev 0)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/DefaultProviderTest.java 2009-11-10 21:04:56 UTC (rev 18583)
@@ -0,0 +1,170 @@
+package org.jboss.tools.jmx.core.test;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.IStreamListener;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.core.model.IStreamMonitor;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.jboss.tools.jmx.core.ExtensionManager;
+import org.jboss.tools.jmx.core.IConnectionProvider;
+import org.jboss.tools.jmx.core.IConnectionWrapper;
+import org.jboss.tools.jmx.core.providers.DefaultConnectionProvider;
+import org.jboss.tools.jmx.core.test.util.TestProjectProvider;
+import org.jboss.tools.jmx.core.tree.DomainNode;
+import org.jboss.tools.jmx.core.tree.Node;
+import org.jboss.tools.jmx.core.tree.Root;
+import org.jboss.tools.test.util.JobUtils;
+
+public class DefaultProviderTest extends TestCase {
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testExtensionExists() {
+ String providerClass = "org.jboss.tools.jmx.core.providers.DefaultConnectionProvider";
+ IExtension[] extensions = findExtension(ExtensionManager.MBEAN_CONNECTION);
+ for (int i = 0; i < extensions.length; i++) {
+ IConfigurationElement elements[] = extensions[i]
+ .getConfigurationElements();
+ for( int j = 0; j < elements.length; j++ ) {
+ if( elements[j].getAttribute("class").equals(providerClass))
+ return;
+ }
+ }
+ fail("Default Provider extension not found");
+ }
+
+ public void testProviderExists() throws Exception {
+ IConnectionProvider defProvider = null;
+ IConnectionProvider[] providers = ExtensionManager.getProviders();
+ for( int i = 0; i < providers.length; i++ ) {
+ if( providers[i].getId().equals(DefaultConnectionProvider.PROVIDER_ID))
+ defProvider = providers[i];
+ }
+ if( defProvider == null )
+ fail("Default Provider not found");
+
+ defProvider = ExtensionManager.getProvider(DefaultConnectionProvider.PROVIDER_ID);
+ if( defProvider == null )
+ fail("Default Provider not found 2");
+
+ }
+
+ @SuppressWarnings("unchecked")
+ public void testConnection() throws Exception {
+ TestProjectProvider projectProvider;
+ IProject project;
+ projectProvider = new TestProjectProvider(JMXTestPlugin.PLUGIN_ID,
+ "projects" + Path.SEPARATOR + "JMX_EXAMPLE",
+ null, true);
+ project = projectProvider.getProject();
+ project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ JobUtils.waitForIdle();
+
+ ILaunchConfigurationWorkingCopy wc = createLaunch();
+ ILaunch launch = wc.launch("run", new NullProgressMonitor());
+
+
+ /* */
+ IProcess p = launch.getProcesses()[0];
+ p.getStreamsProxy().getErrorStreamMonitor().addListener(new IStreamListener() {
+ public void streamAppended(String text, IStreamMonitor monitor) {
+ System.out.println("[error] " + text);
+ }
+ });
+ p.getStreamsProxy().getOutputStreamMonitor().addListener(new IStreamListener() {
+ public void streamAppended(String text, IStreamMonitor monitor) {
+ System.out.println("[out] " + text);
+ }
+ });
+
+ /* */
+ Thread.sleep(10000);
+
+ try {
+ IConnectionProvider defProvider =
+ ExtensionManager.getProvider(DefaultConnectionProvider.PROVIDER_ID);
+ HashMap map = new HashMap();
+ map.put(DefaultConnectionProvider.ID, "Test Connection");
+ map.put(DefaultConnectionProvider.URL, "service:jmx:rmi:///jndi/rmi://localhost:9999" +
+ "/jmxrmi");
+ map.put(DefaultConnectionProvider.USERNAME, "");
+ map.put(DefaultConnectionProvider.PASSWORD, "");
+ IConnectionWrapper wrapper = defProvider.createConnection(map);
+ assertTrue("Connection was null", wrapper != null);
+
+ wrapper.connect();
+ Root root = wrapper.getRoot();
+ assertTrue("Root was not null", root == null);
+
+ wrapper.loadRoot(new NullProgressMonitor());
+ root = wrapper.getRoot();
+ assertTrue("Root was null", root != null);
+
+ Node[] children = root.getChildren();
+ assertTrue("children were null", children != null);
+ assertTrue("children length was less than 1", children.length >= 0);
+
+ boolean found = false;
+ for( int i = 0; i < children.length; i++ )
+ if( children[i] instanceof DomainNode && ((DomainNode)children[i]).getDomain().equals("com.example.mbeans"))
+ found = true;
+
+ assertTrue("Domain \"com.example\" not found", found);
+ } finally {
+ projectProvider.dispose();
+ launch.terminate();
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ protected ILaunchConfigurationWorkingCopy createLaunch() throws Exception {
+ ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
+ ILaunchConfigurationType launchConfigType = launchManager.getLaunchConfigurationType("org.eclipse.jdt.launching.localJavaApplication");
+ ILaunchConfigurationWorkingCopy wc = launchConfigType.newInstance(null, "Test1");
+
+ wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "JMX_EXAMPLE");
+ wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "com.example.mbeans.Main");
+ wc.setAttribute("org.eclipse.debug.core.MAPPED_RESOURCE_PATHS",
+ new ArrayList(Arrays.asList(new String[] {
+ "/JMX_EXAMPLE/src/com/example/mbeans/Main.java"
+ })));
+ wc.setAttribute("org.eclipse.debug.core.MAPPED_RESOURCE_TYPES",
+ new ArrayList(Arrays.asList(new String[] {"1"})));
+ wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
+ "-Dcom.sun.management.jmxremote.port=9999 " +
+ "-Dcom.sun.management.jmxremote.authenticate=false " +
+ "-Dcom.sun.management.jmxremote.ssl=false");
+ return wc;
+ }
+
+ private static IExtension[] findExtension(String extensionId) {
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint extensionPoint = registry
+ .getExtensionPoint(extensionId);
+ return extensionPoint.getExtensions();
+ }
+}
Copied: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/JMXCoreAllTests.java (from rev 18582, trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/JMXCoreAllTests.java)
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/JMXCoreAllTests.java (rev 0)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/JMXCoreAllTests.java 2009-11-10 21:04:56 UTC (rev 18583)
@@ -0,0 +1,16 @@
+package org.jboss.tools.jmx.core.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class JMXCoreAllTests extends TestSuite {
+ public static Test suite(){
+ return new JMXCoreAllTests();
+ }
+
+ public JMXCoreAllTests() {
+ super("JMX Core All Tests");
+ addTest(new TestSuite(DefaultProviderTest.class));
+ addTest(new TestSuite(NodeBuilderTestCase.class));
+ }
+}
Copied: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/JMXTestPlugin.java (from rev 18575, trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/JMXTestPlugin.java)
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/JMXTestPlugin.java (rev 0)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/JMXTestPlugin.java 2009-11-10 21:04:56 UTC (rev 18583)
@@ -0,0 +1,44 @@
+package org.jboss.tools.jmx.core.test;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.BundleContext;
+
+
+public class JMXTestPlugin extends Plugin {
+
+ public static final String PLUGIN_ID = "org.jboss.tools.jmx.core.test"; //$NON-NLS-1$
+ private static JMXTestPlugin plugin;
+ public JMXTestPlugin() {
+ super();
+ }
+
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+ public static JMXTestPlugin getDefault() {
+ return plugin;
+ }
+
+ public static void log(IStatus status) {
+ getDefault().getLog().log(status);
+ }
+
+ public static void log(Throwable e) {
+ log(e.getMessage(), e);
+ }
+
+ public static void log(String message, Throwable e) {
+ log(IStatus.ERROR, message, e);
+ }
+
+ public static void log(int severity, String message, Throwable e) {
+ log(new Status(severity, PLUGIN_ID, 0, message, e));
+ }
+}
Copied: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/MockConnectionWrapper.java (from rev 18575, trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/MockConnectionWrapper.java)
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/MockConnectionWrapper.java (rev 0)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/MockConnectionWrapper.java 2009-11-10 21:04:56 UTC (rev 18583)
@@ -0,0 +1,44 @@
+package org.jboss.tools.jmx.core.test;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.jboss.tools.jmx.core.IConnectionProvider;
+import org.jboss.tools.jmx.core.IConnectionWrapper;
+import org.jboss.tools.jmx.core.IJMXRunnable;
+import org.jboss.tools.jmx.core.JMXException;
+import org.jboss.tools.jmx.core.tree.Root;
+
+
+public class MockConnectionWrapper implements IConnectionWrapper {
+
+ public boolean canControl() {
+ return false;
+ }
+
+ public void connect() throws IOException {
+ }
+
+ public void disconnect() throws IOException {
+ }
+
+ public IConnectionProvider getProvider() {
+ return null;
+ }
+
+ public Root getRoot() {
+ return null;
+ }
+
+ public boolean isConnected() {
+ return false;
+ }
+
+ public void run(IJMXRunnable runnable) throws JMXException {
+ }
+
+ public void loadRoot(IProgressMonitor monitor) {
+ }
+
+}
Copied: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/NodeBuilderTestCase.java (from rev 18575, trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/NodeBuilderTestCase.java)
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/NodeBuilderTestCase.java (rev 0)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/NodeBuilderTestCase.java 2009-11-10 21:04:56 UTC (rev 18583)
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Jeff Mesnil
+ * 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
+ *******************************************************************************/
+
+package org.jboss.tools.jmx.core.test;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+
+import org.jboss.tools.jmx.core.IConnectionWrapper;
+import org.jboss.tools.jmx.core.tree.DomainNode;
+import org.jboss.tools.jmx.core.tree.Node;
+import org.jboss.tools.jmx.core.tree.NodeBuilder;
+import org.jboss.tools.jmx.core.tree.ObjectNameNode;
+import org.jboss.tools.jmx.core.tree.PropertyNode;
+
+import junit.framework.TestCase;
+
+public class NodeBuilderTestCase extends TestCase {
+
+ private IConnectionWrapper mockConn;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ mockConn = new MockConnectionWrapper();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ mockConn = null;
+ super.tearDown();
+ }
+
+ public void testOneObjectName() throws Exception {
+ ObjectName on = new ObjectName("test:type=Test,name=Test1"); //$NON-NLS-1$
+
+ Node root = NodeBuilder.createRoot(mockConn);
+ NodeBuilder.addToTree(root, on);
+
+ Node[] children = root.getChildren();
+ assertEquals(1, children.length);
+ assertTrue(children[0] instanceof DomainNode);
+ DomainNode domainNode = (DomainNode) children[0];
+ assertEquals("test", domainNode.getDomain()); //$NON-NLS-1$
+
+ children = domainNode.getChildren();
+ assertEquals(1, children.length);
+ assertTrue(children[0] instanceof PropertyNode);
+ PropertyNode typeNode = (PropertyNode) children[0];
+ assertEquals("type", typeNode.getKey()); //$NON-NLS-1$
+ assertEquals("Test", typeNode.getValue()); //$NON-NLS-1$
+
+ children = typeNode.getChildren();
+ assertEquals(1, children.length);
+ assertTrue(children[0] instanceof ObjectNameNode);
+ ObjectNameNode onNode = (ObjectNameNode) children[0];
+ assertEquals(on, onNode.getObjectName());
+ }
+
+ public void testTwoObjectNames() throws Exception {
+ ObjectName on = new ObjectName("test:type=Test,name=Test1"); //$NON-NLS-1$
+ ObjectName on2 = new ObjectName("test:type=Test,name=Test2"); //$NON-NLS-1$
+
+ Node root = NodeBuilder.createRoot(mockConn);
+ NodeBuilder.addToTree(root, on);
+ NodeBuilder.addToTree(root, on2);
+
+ Node[] children = root.getChildren();
+ assertEquals(1, children.length);
+ assertTrue(children[0] instanceof DomainNode);
+ DomainNode domainNode = (DomainNode) children[0];
+ assertEquals("test", domainNode.getDomain()); //$NON-NLS-1$
+
+ children = domainNode.getChildren();
+ assertEquals(1, children.length);
+ assertTrue(children[0] instanceof PropertyNode);
+ PropertyNode typeNode = (PropertyNode) children[0];
+ assertEquals("type", typeNode.getKey()); //$NON-NLS-1$
+ assertEquals("Test", typeNode.getValue()); //$NON-NLS-1$
+
+ children = typeNode.getChildren();
+ assertEquals(2, children.length);
+ assertTrue(children[0] instanceof ObjectNameNode);
+ assertTrue(children[1] instanceof ObjectNameNode);
+ ObjectNameNode onNode = (ObjectNameNode) children[0];
+ ObjectNameNode onNode2 = (ObjectNameNode) children[1];
+ assertEquals(on, onNode.getObjectName());
+ assertEquals(on2, onNode2.getObjectName());
+ }
+
+ public void testTwoDifferentDomains() throws Exception {
+ ObjectName on = new ObjectName("test:type=Test,name=Test1"); //$NON-NLS-1$
+ ObjectName other = new ObjectName("other:type=Test,name=Test2"); //$NON-NLS-1$
+
+ Node root = NodeBuilder.createRoot(mockConn);
+ NodeBuilder.addToTree(root, on);
+ NodeBuilder.addToTree(root, other);
+
+ Node[] children = root.getChildren();
+ assertEquals(2, children.length);
+ assertTrue(children[0] instanceof DomainNode);
+ assertTrue(children[1] instanceof DomainNode);
+ DomainNode domainNode1 = (DomainNode) children[0];
+ DomainNode domainNode2 = (DomainNode) children[1];
+ // domains are sorted by lexical order
+ assertEquals("other", domainNode1.getDomain()); //$NON-NLS-1$
+ assertEquals("test", domainNode2.getDomain()); //$NON-NLS-1$
+ }
+
+ public void testHierarchy() throws Exception {
+ ObjectName on = new ObjectName("test:type=Test,name=Test1"); //$NON-NLS-1$
+ ObjectName on2 = new ObjectName("test:type=Test,name=Test2"); //$NON-NLS-1$
+ ObjectName on3 = new ObjectName("test:type=AnotherTest,name=Test1"); //$NON-NLS-1$
+ ObjectName on4 = new ObjectName("test:type=AnotherTest,name=Test2"); //$NON-NLS-1$
+ ObjectName on5 = new ObjectName("other:type=Test,name=Test1"); //$NON-NLS-1$
+
+ Node root = NodeBuilder.createRoot(mockConn);
+ NodeBuilder.addToTree(root, on);
+ NodeBuilder.addToTree(root, on2);
+ NodeBuilder.addToTree(root, on3);
+ NodeBuilder.addToTree(root, on4);
+ NodeBuilder.addToTree(root, on5);
+ }
+}
Copied: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/util (from rev 18575, trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/util)
Modified: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/util/FileUtil.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/util/FileUtil.java 2009-11-10 17:52:27 UTC (rev 18575)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/util/FileUtil.java 2009-11-10 21:04:56 UTC (rev 18583)
@@ -8,7 +8,7 @@
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.jmx.core.tests.util;
+package org.jboss.tools.jmx.core.test.util;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
@@ -41,7 +41,7 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
-import org.jboss.tools.jmx.core.tests.JMXTestPlugin;
+import org.jboss.tools.jmx.core.test.JMXTestPlugin;
public final class FileUtil {
Modified: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/util/TestProjectProvider.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/util/TestProjectProvider.java 2009-11-10 17:52:27 UTC (rev 18575)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/test/util/TestProjectProvider.java 2009-11-10 21:04:56 UTC (rev 18583)
@@ -8,7 +8,7 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.jmx.core.tests.util;
+package org.jboss.tools.jmx.core.test.util;
import java.io.File;
import java.io.IOException;
@@ -29,7 +29,7 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
-import org.jboss.tools.jmx.core.tests.JMXTestPlugin;
+import org.jboss.tools.jmx.core.test.JMXTestPlugin;
import org.osgi.framework.Bundle;
/**
Deleted: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/DefaultProviderTest.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/DefaultProviderTest.java 2009-11-10 21:03:29 UTC (rev 18582)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/DefaultProviderTest.java 2009-11-10 21:04:56 UTC (rev 18583)
@@ -1,170 +0,0 @@
-package org.jboss.tools.jmx.core.tests;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.IStreamListener;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.model.IStreamMonitor;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.jboss.tools.jmx.core.ExtensionManager;
-import org.jboss.tools.jmx.core.IConnectionProvider;
-import org.jboss.tools.jmx.core.IConnectionWrapper;
-import org.jboss.tools.jmx.core.providers.DefaultConnectionProvider;
-import org.jboss.tools.jmx.core.tests.util.TestProjectProvider;
-import org.jboss.tools.jmx.core.tree.DomainNode;
-import org.jboss.tools.jmx.core.tree.Node;
-import org.jboss.tools.jmx.core.tree.Root;
-import org.jboss.tools.test.util.JobUtils;
-
-public class DefaultProviderTest extends TestCase {
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testExtensionExists() {
- String providerClass = "org.jboss.tools.jmx.core.providers.DefaultConnectionProvider";
- IExtension[] extensions = findExtension(ExtensionManager.MBEAN_CONNECTION);
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement elements[] = extensions[i]
- .getConfigurationElements();
- for( int j = 0; j < elements.length; j++ ) {
- if( elements[j].getAttribute("class").equals(providerClass))
- return;
- }
- }
- fail("Default Provider extension not found");
- }
-
- public void testProviderExists() throws Exception {
- IConnectionProvider defProvider = null;
- IConnectionProvider[] providers = ExtensionManager.getProviders();
- for( int i = 0; i < providers.length; i++ ) {
- if( providers[i].getId().equals(DefaultConnectionProvider.PROVIDER_ID))
- defProvider = providers[i];
- }
- if( defProvider == null )
- fail("Default Provider not found");
-
- defProvider = ExtensionManager.getProvider(DefaultConnectionProvider.PROVIDER_ID);
- if( defProvider == null )
- fail("Default Provider not found 2");
-
- }
-
- @SuppressWarnings("unchecked")
- public void testConnection() throws Exception {
- TestProjectProvider projectProvider;
- IProject project;
- projectProvider = new TestProjectProvider(JMXTestPlugin.PLUGIN_ID,
- "projects" + Path.SEPARATOR + "JMX_EXAMPLE",
- null, true);
- project = projectProvider.getProject();
- project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
- JobUtils.waitForIdle();
-
- ILaunchConfigurationWorkingCopy wc = createLaunch();
- ILaunch launch = wc.launch("run", new NullProgressMonitor());
-
-
- /* */
- IProcess p = launch.getProcesses()[0];
- p.getStreamsProxy().getErrorStreamMonitor().addListener(new IStreamListener() {
- public void streamAppended(String text, IStreamMonitor monitor) {
- System.out.println("[error] " + text);
- }
- });
- p.getStreamsProxy().getOutputStreamMonitor().addListener(new IStreamListener() {
- public void streamAppended(String text, IStreamMonitor monitor) {
- System.out.println("[out] " + text);
- }
- });
-
- /* */
- Thread.sleep(10000);
-
- try {
- IConnectionProvider defProvider =
- ExtensionManager.getProvider(DefaultConnectionProvider.PROVIDER_ID);
- HashMap map = new HashMap();
- map.put(DefaultConnectionProvider.ID, "Test Connection");
- map.put(DefaultConnectionProvider.URL, "service:jmx:rmi:///jndi/rmi://localhost:9999" +
- "/jmxrmi");
- map.put(DefaultConnectionProvider.USERNAME, "");
- map.put(DefaultConnectionProvider.PASSWORD, "");
- IConnectionWrapper wrapper = defProvider.createConnection(map);
- assertTrue("Connection was null", wrapper != null);
-
- wrapper.connect();
- Root root = wrapper.getRoot();
- assertTrue("Root was not null", root == null);
-
- wrapper.loadRoot(new NullProgressMonitor());
- root = wrapper.getRoot();
- assertTrue("Root was null", root != null);
-
- Node[] children = root.getChildren();
- assertTrue("children were null", children != null);
- assertTrue("children length was less than 1", children.length >= 0);
-
- boolean found = false;
- for( int i = 0; i < children.length; i++ )
- if( children[i] instanceof DomainNode && ((DomainNode)children[i]).getDomain().equals("com.example.mbeans"))
- found = true;
-
- assertTrue("Domain \"com.example\" not found", found);
- } finally {
- projectProvider.dispose();
- launch.terminate();
- }
- }
-
- @SuppressWarnings("unchecked")
- protected ILaunchConfigurationWorkingCopy createLaunch() throws Exception {
- ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType launchConfigType = launchManager.getLaunchConfigurationType("org.eclipse.jdt.launching.localJavaApplication");
- ILaunchConfigurationWorkingCopy wc = launchConfigType.newInstance(null, "Test1");
-
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "JMX_EXAMPLE");
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "com.example.mbeans.Main");
- wc.setAttribute("org.eclipse.debug.core.MAPPED_RESOURCE_PATHS",
- new ArrayList(Arrays.asList(new String[] {
- "/JMX_EXAMPLE/src/com/example/mbeans/Main.java"
- })));
- wc.setAttribute("org.eclipse.debug.core.MAPPED_RESOURCE_TYPES",
- new ArrayList(Arrays.asList(new String[] {"1"})));
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
- "-Dcom.sun.management.jmxremote.port=9999 " +
- "-Dcom.sun.management.jmxremote.authenticate=false " +
- "-Dcom.sun.management.jmxremote.ssl=false");
- return wc;
- }
-
- private static IExtension[] findExtension(String extensionId) {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint extensionPoint = registry
- .getExtensionPoint(extensionId);
- return extensionPoint.getExtensions();
- }
-}
Deleted: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/JMXCoreAllTests.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/JMXCoreAllTests.java 2009-11-10 21:03:29 UTC (rev 18582)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/JMXCoreAllTests.java 2009-11-10 21:04:56 UTC (rev 18583)
@@ -1,16 +0,0 @@
-package org.jboss.tools.jmx.core.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class JMXCoreAllTests extends TestSuite {
- public static Test suite(){
- return new JMXCoreAllTests();
- }
-
- public JMXCoreAllTests() {
- super("JMX Core All Tests");
- addTest(new TestSuite(DefaultProviderTest.class));
- addTest(new TestSuite(NodeBuilderTestCase.class));
- }
-}
Deleted: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/JMXTestPlugin.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/JMXTestPlugin.java 2009-11-10 21:03:29 UTC (rev 18582)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/JMXTestPlugin.java 2009-11-10 21:04:56 UTC (rev 18583)
@@ -1,44 +0,0 @@
-package org.jboss.tools.jmx.core.tests;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.osgi.framework.BundleContext;
-
-
-public class JMXTestPlugin extends Plugin {
-
- public static final String PLUGIN_ID = "org.jboss.tools.jmx.core.test"; //$NON-NLS-1$
- private static JMXTestPlugin plugin;
- public JMXTestPlugin() {
- super();
- }
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
- public static JMXTestPlugin getDefault() {
- return plugin;
- }
-
- public static void log(IStatus status) {
- getDefault().getLog().log(status);
- }
-
- public static void log(Throwable e) {
- log(e.getMessage(), e);
- }
-
- public static void log(String message, Throwable e) {
- log(IStatus.ERROR, message, e);
- }
-
- public static void log(int severity, String message, Throwable e) {
- log(new Status(severity, PLUGIN_ID, 0, message, e));
- }
-}
Deleted: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/MockConnectionWrapper.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/MockConnectionWrapper.java 2009-11-10 21:03:29 UTC (rev 18582)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/MockConnectionWrapper.java 2009-11-10 21:04:56 UTC (rev 18583)
@@ -1,44 +0,0 @@
-package org.jboss.tools.jmx.core.tests;
-
-import java.io.IOException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.jboss.tools.jmx.core.IConnectionProvider;
-import org.jboss.tools.jmx.core.IConnectionWrapper;
-import org.jboss.tools.jmx.core.IJMXRunnable;
-import org.jboss.tools.jmx.core.JMXException;
-import org.jboss.tools.jmx.core.tree.Root;
-
-
-public class MockConnectionWrapper implements IConnectionWrapper {
-
- public boolean canControl() {
- return false;
- }
-
- public void connect() throws IOException {
- }
-
- public void disconnect() throws IOException {
- }
-
- public IConnectionProvider getProvider() {
- return null;
- }
-
- public Root getRoot() {
- return null;
- }
-
- public boolean isConnected() {
- return false;
- }
-
- public void run(IJMXRunnable runnable) throws JMXException {
- }
-
- public void loadRoot(IProgressMonitor monitor) {
- }
-
-}
Deleted: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/NodeBuilderTestCase.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/NodeBuilderTestCase.java 2009-11-10 21:03:29 UTC (rev 18582)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/NodeBuilderTestCase.java 2009-11-10 21:04:56 UTC (rev 18583)
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Jeff Mesnil
- * 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
- *******************************************************************************/
-
-package org.jboss.tools.jmx.core.tests;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-
-import org.jboss.tools.jmx.core.IConnectionWrapper;
-import org.jboss.tools.jmx.core.tree.DomainNode;
-import org.jboss.tools.jmx.core.tree.Node;
-import org.jboss.tools.jmx.core.tree.NodeBuilder;
-import org.jboss.tools.jmx.core.tree.ObjectNameNode;
-import org.jboss.tools.jmx.core.tree.PropertyNode;
-
-import junit.framework.TestCase;
-
-public class NodeBuilderTestCase extends TestCase {
-
- private IConnectionWrapper mockConn;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- mockConn = new MockConnectionWrapper();
- }
-
- @Override
- protected void tearDown() throws Exception {
- mockConn = null;
- super.tearDown();
- }
-
- public void testOneObjectName() throws Exception {
- ObjectName on = new ObjectName("test:type=Test,name=Test1"); //$NON-NLS-1$
-
- Node root = NodeBuilder.createRoot(mockConn);
- NodeBuilder.addToTree(root, on);
-
- Node[] children = root.getChildren();
- assertEquals(1, children.length);
- assertTrue(children[0] instanceof DomainNode);
- DomainNode domainNode = (DomainNode) children[0];
- assertEquals("test", domainNode.getDomain()); //$NON-NLS-1$
-
- children = domainNode.getChildren();
- assertEquals(1, children.length);
- assertTrue(children[0] instanceof PropertyNode);
- PropertyNode typeNode = (PropertyNode) children[0];
- assertEquals("type", typeNode.getKey()); //$NON-NLS-1$
- assertEquals("Test", typeNode.getValue()); //$NON-NLS-1$
-
- children = typeNode.getChildren();
- assertEquals(1, children.length);
- assertTrue(children[0] instanceof ObjectNameNode);
- ObjectNameNode onNode = (ObjectNameNode) children[0];
- assertEquals(on, onNode.getObjectName());
- }
-
- public void testTwoObjectNames() throws Exception {
- ObjectName on = new ObjectName("test:type=Test,name=Test1"); //$NON-NLS-1$
- ObjectName on2 = new ObjectName("test:type=Test,name=Test2"); //$NON-NLS-1$
-
- Node root = NodeBuilder.createRoot(mockConn);
- NodeBuilder.addToTree(root, on);
- NodeBuilder.addToTree(root, on2);
-
- Node[] children = root.getChildren();
- assertEquals(1, children.length);
- assertTrue(children[0] instanceof DomainNode);
- DomainNode domainNode = (DomainNode) children[0];
- assertEquals("test", domainNode.getDomain()); //$NON-NLS-1$
-
- children = domainNode.getChildren();
- assertEquals(1, children.length);
- assertTrue(children[0] instanceof PropertyNode);
- PropertyNode typeNode = (PropertyNode) children[0];
- assertEquals("type", typeNode.getKey()); //$NON-NLS-1$
- assertEquals("Test", typeNode.getValue()); //$NON-NLS-1$
-
- children = typeNode.getChildren();
- assertEquals(2, children.length);
- assertTrue(children[0] instanceof ObjectNameNode);
- assertTrue(children[1] instanceof ObjectNameNode);
- ObjectNameNode onNode = (ObjectNameNode) children[0];
- ObjectNameNode onNode2 = (ObjectNameNode) children[1];
- assertEquals(on, onNode.getObjectName());
- assertEquals(on2, onNode2.getObjectName());
- }
-
- public void testTwoDifferentDomains() throws Exception {
- ObjectName on = new ObjectName("test:type=Test,name=Test1"); //$NON-NLS-1$
- ObjectName other = new ObjectName("other:type=Test,name=Test2"); //$NON-NLS-1$
-
- Node root = NodeBuilder.createRoot(mockConn);
- NodeBuilder.addToTree(root, on);
- NodeBuilder.addToTree(root, other);
-
- Node[] children = root.getChildren();
- assertEquals(2, children.length);
- assertTrue(children[0] instanceof DomainNode);
- assertTrue(children[1] instanceof DomainNode);
- DomainNode domainNode1 = (DomainNode) children[0];
- DomainNode domainNode2 = (DomainNode) children[1];
- // domains are sorted by lexical order
- assertEquals("other", domainNode1.getDomain()); //$NON-NLS-1$
- assertEquals("test", domainNode2.getDomain()); //$NON-NLS-1$
- }
-
- public void testHierarchy() throws Exception {
- ObjectName on = new ObjectName("test:type=Test,name=Test1"); //$NON-NLS-1$
- ObjectName on2 = new ObjectName("test:type=Test,name=Test2"); //$NON-NLS-1$
- ObjectName on3 = new ObjectName("test:type=AnotherTest,name=Test1"); //$NON-NLS-1$
- ObjectName on4 = new ObjectName("test:type=AnotherTest,name=Test2"); //$NON-NLS-1$
- ObjectName on5 = new ObjectName("other:type=Test,name=Test1"); //$NON-NLS-1$
-
- Node root = NodeBuilder.createRoot(mockConn);
- NodeBuilder.addToTree(root, on);
- NodeBuilder.addToTree(root, on2);
- NodeBuilder.addToTree(root, on3);
- NodeBuilder.addToTree(root, on4);
- NodeBuilder.addToTree(root, on5);
- }
-}
15 years, 1 month
JBoss Tools SVN: r18582 - in trunk/jmx/tests/org.jboss.tools.jmx.core.test: src/org/jboss/tools/jmx/core and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-11-10 16:03:29 -0500 (Tue, 10 Nov 2009)
New Revision: 18582
Added:
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/JMXCoreAllTests.java
Removed:
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/JMXCoreAllTests.java
Modified:
trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF
Log:
JBIDE-5180 test issue
Modified: trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF 2009-11-10 21:02:39 UTC (rev 18581)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF 2009-11-10 21:03:29 UTC (rev 18582)
@@ -14,8 +14,7 @@
org.eclipse.debug.core,
org.eclipse.jdt.launching,
org.jboss.tools.tests
-Export-Package: org.jboss.tools.jmx.core,
- org.jboss.tools.jmx.core.tests,
+Export-Package: org.jboss.tools.jmx.core.tests,
org.jboss.tools.jmx.core.tests.util
Bundle-ClassPath: .
Import-Package: org.jboss.tools.jmx.core
Deleted: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/JMXCoreAllTests.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/JMXCoreAllTests.java 2009-11-10 21:02:39 UTC (rev 18581)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/JMXCoreAllTests.java 2009-11-10 21:03:29 UTC (rev 18582)
@@ -1,16 +0,0 @@
-package org.jboss.tools.jmx.core;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.jboss.tools.jmx.core.tests.DefaultProviderTest;
-import org.jboss.tools.jmx.core.tests.NodeBuilderTestCase;
-
-
-public class JMXCoreAllTests {
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTestSuite(DefaultProviderTest.class);
- suite.addTestSuite(NodeBuilderTestCase.class);
- return suite;
- }
-}
Added: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/JMXCoreAllTests.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/JMXCoreAllTests.java (rev 0)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/JMXCoreAllTests.java 2009-11-10 21:03:29 UTC (rev 18582)
@@ -0,0 +1,16 @@
+package org.jboss.tools.jmx.core.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class JMXCoreAllTests extends TestSuite {
+ public static Test suite(){
+ return new JMXCoreAllTests();
+ }
+
+ public JMXCoreAllTests() {
+ super("JMX Core All Tests");
+ addTest(new TestSuite(DefaultProviderTest.class));
+ addTest(new TestSuite(NodeBuilderTestCase.class));
+ }
+}
15 years, 1 month
JBoss Tools SVN: r18581 - trunk/jmx/releng.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-11-10 16:02:39 -0500 (Tue, 10 Nov 2009)
New Revision: 18581
Modified:
trunk/jmx/releng/testing.properties
Log:
moved the suite class
Modified: trunk/jmx/releng/testing.properties
===================================================================
--- trunk/jmx/releng/testing.properties 2009-11-10 20:26:43 UTC (rev 18580)
+++ trunk/jmx/releng/testing.properties 2009-11-10 21:02:39 UTC (rev 18581)
@@ -8,4 +8,4 @@
# define which suite to run within each test plugin; or, include a test.xml script in
# the test plugin to deviate from default one-suite-per-plugin operation
org.jboss.tools.jmx.ui.test.suite=org.jboss.tools.jmx.ui.JMXUIAllTests
-org.jboss.tools.jmx.core.test.suite=org.jboss.tools.jmx.core.JMXCoreAllTests
+org.jboss.tools.jmx.core.test.suite=org.jboss.tools.jmx.core.tests.JMXCoreAlltests
\ No newline at end of file
15 years, 1 month
JBoss Tools SVN: r18580 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-11-10 15:26:43 -0500 (Tue, 10 Nov 2009)
New Revision: 18580
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5181
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java 2009-11-10 20:03:21 UTC (rev 18579)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java 2009-11-10 20:26:43 UTC (rev 18580)
@@ -491,10 +491,23 @@
} else {
IVirtualComponent component = ComponentCore.createComponent(seamWebProject);
IVirtualFolder rootFolder = component.getRootFolder();
- IPath srcRootFolder = rootFolder.getFolder(new Path("/WEB-INF/classes")).getUnderlyingFolder().getParent().getFullPath(); //$NON-NLS-1$
- prefs.put(ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER, srcRootFolder.append(ISeamFacetDataModelProperties.DEFAULT_MODEL_SRC_FOLDER_NAME).toString());
- prefs.put(ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER, srcRootFolder.append(ISeamFacetDataModelProperties.DEFAULT_ACTION_SRC_FOLDER_NAME).toString());
+ IContainer sourceFolder = rootFolder.getFolder(new Path("/WEB-INF/classes")).getUnderlyingFolder(); //$NON-NLS-1$
+ IContainer parentFolder = sourceFolder.getParent();
+ IPath srcRootFolder = parentFolder.getFullPath();
+ IPath srcFolder = sourceFolder.getFullPath();
+
+ IPath model = srcRootFolder.append(ISeamFacetDataModelProperties.DEFAULT_MODEL_SRC_FOLDER_NAME);
+ IPath action = srcRootFolder.append(ISeamFacetDataModelProperties.DEFAULT_ACTION_SRC_FOLDER_NAME);
+ IResource modelFolder = parentFolder.findMember(ISeamFacetDataModelProperties.DEFAULT_MODEL_SRC_FOLDER_NAME);
+ IResource actionFolder = parentFolder.findMember(ISeamFacetDataModelProperties.DEFAULT_ACTION_SRC_FOLDER_NAME);
+ if(modelFolder==null || !modelFolder.exists() || actionFolder==null || !actionFolder.exists()) {
+ model = srcFolder;
+ action = srcFolder;
+ }
+
+ prefs.put(ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER, model.toString());
+ prefs.put(ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER, action.toString());
}
try {
15 years, 1 month
JBoss Tools SVN: r18579 - trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/mbeans.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-11-10 15:03:21 -0500 (Tue, 10 Nov 2009)
New Revision: 18579
Added:
trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/mbeans/Hello.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/mbeans/HelloMBean.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/mbeans/Main.java
Log:
another attempt to fix JMXCOnnection test errors
Added: trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/mbeans/Hello.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/mbeans/Hello.java (rev 0)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/mbeans/Hello.java 2009-11-10 20:03:21 UTC (rev 18579)
@@ -0,0 +1,52 @@
+/* Hello.java - MBean implementation for the Hello World MBean.
+ This class must implement all the Java methods declared in the
+ HelloMBean interface, with the appropriate behavior for each one. */
+
+package com.example.mbeans;
+
+public class Hello implements HelloMBean {
+ public void sayHello() {
+ System.out.println("hello, world");
+ }
+
+ public int add(int x, int y) {
+ return x + y;
+ }
+
+ /* Getter for the Name attribute. The pattern shown here is
+ frequent: the getter returns a private field representing the
+ attribute value. In our case, the attribute value never
+ changes, but for other attributes it might change as the
+ application runs. Consider an attribute representing
+ statistics such as uptime or memory usage, for example. Being
+ read-only just means that it can't be changed through the
+ management interface. */
+ public String getName() {
+ return this.name;
+ }
+
+ /* Getter for the CacheSize attribute. The pattern shown here is
+ frequent: the getter returns a private field representing the
+ attribute value, and the setter changes that field. */
+ public int getCacheSize() {
+ return this.cacheSize;
+ }
+
+ /* Setter for the CacheSize attribute. To avoid problems with
+ stale values in multithreaded situations, it is a good idea
+ for setters to be synchronized. */
+ public synchronized void setCacheSize(int size) {
+ this.cacheSize = size;
+
+ /* In a real application, changing the attribute would
+ typically have effects beyond just modifying the cacheSize
+ field. For example, resizing the cache might mean
+ discarding entries or allocating new ones. The logic for
+ these effects would be here. */
+ System.out.println("Cache size now " + this.cacheSize);
+ }
+
+ private final String name = "Reginald";
+ private int cacheSize = DEFAULT_CACHE_SIZE;
+ private static final int DEFAULT_CACHE_SIZE = 200;
+}
Property changes on: trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/mbeans/Hello.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/mbeans/HelloMBean.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/mbeans/HelloMBean.java (rev 0)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/mbeans/HelloMBean.java 2009-11-10 20:03:21 UTC (rev 18579)
@@ -0,0 +1,22 @@
+/* HelloMBean.java - MBean interface describing the management
+ operations and attributes for the Hello World MBean. In this case
+ there are two operations, "sayHello" and "add", and two attributes,
+ "Name" and "CacheSize". */
+
+package com.example.mbeans;
+
+public interface HelloMBean {
+ // operations
+
+ public void sayHello();
+ public int add(int x, int y);
+
+ // attributes
+
+ // a read-only attribute called Name of type String
+ public String getName();
+
+ // a read-write attribute called CacheSize of type int
+ public int getCacheSize();
+ public void setCacheSize(int size);
+}
Property changes on: trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/mbeans/HelloMBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/mbeans/Main.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/mbeans/Main.java (rev 0)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/mbeans/Main.java 2009-11-10 20:03:21 UTC (rev 18579)
@@ -0,0 +1,31 @@
+/* Main.java - main class for Hello World example. Create the
+ HelloWorld MBean, register it, then wait forever (or until the
+ program is interrupted). */
+
+package com.example.mbeans;
+
+import java.lang.management.*;
+import javax.management.*;
+
+public class Main {
+ /* For simplicity, we declare "throws Exception". Real programs
+ will usually want finer-grained exception handling. */
+ public static void main(String[] args) throws Exception {
+ // Get the Platform MBean Server
+ MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
+
+ // Construct the ObjectName for the MBean we will register
+ ObjectName name = new ObjectName("com.example.mbeans:type=Hello");
+
+ // Create the Hello World MBean
+ Hello mbean = new Hello();
+
+ // Register the Hello World MBean
+ mbs.registerMBean(mbean, name);
+
+ // Wait forever
+ System.out.println("Waiting forever...");
+ Thread.sleep(Long.MAX_VALUE);
+ }
+}
+
\ No newline at end of file
Property changes on: trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/mbeans/Main.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 1 month
JBoss Tools SVN: r18577 - trunk/bpel/releng.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-11-10 15:02:39 -0500 (Tue, 10 Nov 2009)
New Revision: 18577
Modified:
trunk/bpel/releng/build.properties
trunk/bpel/releng/build.properties.example.hudson.qa.jboss.com
Log:
switch to 64-bit hudson slaves; switch to 64-bit Eclipse input
Modified: trunk/bpel/releng/build.properties
===================================================================
--- trunk/bpel/releng/build.properties 2009-11-10 20:01:31 UTC (rev 18576)
+++ trunk/bpel/releng/build.properties 2009-11-10 20:02:39 UTC (rev 18577)
@@ -26,8 +26,8 @@
http://repository.jboss.org/eclipse/galileo/xsd-runtime-2.5.0.zip,\
http://repository.jboss.org/eclipse/galileo/wtp-R-3.1.1-20090917225226.zip,\
http://repository.jboss.org/eclipse/galileo/dtp_1.7.1.zip,\
-http://repository.jboss.org/eclipse/galileo/eclipse-SDK-3.5.1-linux-gtk.tar.gz
-#http://repository.jboss.org/eclipse/galileo/eclipse-SDK-3.5.1-linux-gtk-x86_64.tar.gz
+http://repository.jboss.org/eclipse/galileo/eclipse-SDK-3.5.1-linux-gtk-x86_64.tar.gz
+#http://repository.jboss.org/eclipse/galileo/eclipse-SDK-3.5.1-linux-gtk.tar.gz
# use precompiled binaries from latest build as input to this build
repositoryURLs=http://download.eclipse.org/releases/galileo/,http://downl...
Modified: trunk/bpel/releng/build.properties.example.hudson.qa.jboss.com
===================================================================
--- trunk/bpel/releng/build.properties.example.hudson.qa.jboss.com 2009-11-10 20:01:31 UTC (rev 18576)
+++ trunk/bpel/releng/build.properties.example.hudson.qa.jboss.com 2009-11-10 20:02:39 UTC (rev 18577)
@@ -26,8 +26,8 @@
http://repository.jboss.org/eclipse/galileo/xsd-runtime-2.5.0.zip,\
http://repository.jboss.org/eclipse/galileo/wtp-R-3.1.1-20090917225226.zip,\
http://repository.jboss.org/eclipse/galileo/dtp_1.7.1.zip,\
-http://repository.jboss.org/eclipse/galileo/eclipse-SDK-3.5.1-linux-gtk.tar.gz
-#http://repository.jboss.org/eclipse/galileo/eclipse-SDK-3.5.1-linux-gtk-x86_64.tar.gz
+http://repository.jboss.org/eclipse/galileo/eclipse-SDK-3.5.1-linux-gtk-x86_64.tar.gz
+#http://repository.jboss.org/eclipse/galileo/eclipse-SDK-3.5.1-linux-gtk.tar.gz
# use precompiled binaries from latest build as input to this build
repositoryURLs=http://download.eclipse.org/releases/galileo/,http://downl...
15 years, 1 month
JBoss Tools SVN: r18576 - trunk/jmx/releng.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-11-10 15:01:31 -0500 (Tue, 10 Nov 2009)
New Revision: 18576
Modified:
trunk/jmx/releng/build.properties
Log:
switch to 64-bit hudson slaves; switch to 64-bit Eclipse input
Modified: trunk/jmx/releng/build.properties
===================================================================
--- trunk/jmx/releng/build.properties 2009-11-10 17:52:27 UTC (rev 18575)
+++ trunk/jmx/releng/build.properties 2009-11-10 20:01:31 UTC (rev 18576)
@@ -21,7 +21,7 @@
JAVA60_HOME=${JAVA_HOME_PARENT}
dependencyURLs=\
-http://repository.jboss.org/eclipse/galileo/eclipse-SDK-3.5.1-linux-gtk.tar.gz
+http://repository.jboss.org/eclipse/galileo/eclipse-SDK-3.5.1-linux-gtk-x86_64.tar.gz
# use precompiled binaries from latest build as input to this build
repositoryURLs=http://download.eclipse.org/releases/galileo/,http://downl...
15 years, 1 month
JBoss Tools SVN: r18575 - in documentation/trunk/movies: welcome_to_JBDS and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-11-10 12:52:27 -0500 (Tue, 10 Nov 2009)
New Revision: 18575
Added:
documentation/trunk/movies/welcome_to_JBDS/
documentation/trunk/movies/welcome_to_JBDS/readme.txt
documentation/trunk/movies/welcome_to_JBDS/welcome_jbds.wnk
Log:
new demo on JBDS is added
Added: documentation/trunk/movies/welcome_to_JBDS/readme.txt
===================================================================
--- documentation/trunk/movies/welcome_to_JBDS/readme.txt (rev 0)
+++ documentation/trunk/movies/welcome_to_JBDS/readme.txt 2009-11-10 17:52:27 UTC (rev 18575)
@@ -0,0 +1,25 @@
+To apply Jboss org styles to the generated HTML file, you should do next:
+
+
+- first, add the HEAD of the HTML document to attach a style sheet, a tab icon and a title of the page:
+
+ <head>
+ <title>Welcome to JBDS</title>
+ <link rel="stylesheet" href="../resources/tools.css"
+ type="text/css"/>
+ <link xmlns="" rel="shortcut icon" type="image/vnd.microsoft.icon" href="../resources/images/favicon.ico"/>
+ </head>
+
+
+- place the generated by Wink OBJECT inside this block element:
+
+ <div class="book">
+ <p id="title"><a href="http://www.jboss.org" class="site_href">
+ <strong>JBoss.org</strong></a><a href="http://docs.jboss.org/" class="doc_href">
+ <strong>Community Demos</strong></a></p>
+
+ <--! Place the OBJECT generated by Wink here. -->
+
+ </div>
+
+
\ No newline at end of file
Added: documentation/trunk/movies/welcome_to_JBDS/welcome_jbds.wnk
===================================================================
(Binary files differ)
Property changes on: documentation/trunk/movies/welcome_to_JBDS/welcome_jbds.wnk
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 1 month