rhmessaging commits: r3814 - store/trunk/cpp/tests.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2010-01-22 11:19:04 -0500 (Fri, 22 Jan 2010)
New Revision: 3814
Modified:
store/trunk/cpp/tests/persistence.py
Log:
Fix for change made in qpid r.902055
Modified: store/trunk/cpp/tests/persistence.py
===================================================================
--- store/trunk/cpp/tests/persistence.py 2010-01-21 16:53:35 UTC (rev 3813)
+++ store/trunk/cpp/tests/persistence.py 2010-01-22 16:19:04 UTC (rev 3814)
@@ -151,6 +151,7 @@
extra = lvq.get(timeout=1)
self.fail("lvq-test not empty, contains: " + extra.body)
except Empty: None
+ session.message_cancel(destination="lvq")
session.queue_delete(queue="lvq-test")
14 years, 11 months
rhmessaging commits: r3813 - mgmt/trunk/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-01-21 11:53:35 -0500 (Thu, 21 Jan 2010)
New Revision: 3813
Modified:
mgmt/trunk/cumin/resources/slots.swf
Log:
Fix border size for Activity rollover.
Modified: mgmt/trunk/cumin/resources/slots.swf
===================================================================
(Binary files differ)
14 years, 11 months
rhmessaging commits: r3812 - store/branches/java/0.5-release/src/tools/java/org/apache/qpid/server/store/berkeleydb.
by rhmessaging-commits@lists.jboss.org
Author: rgemmell
Date: 2010-01-20 10:35:06 -0500 (Wed, 20 Jan 2010)
New Revision: 3812
Modified:
store/branches/java/0.5-release/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreBindingsWorkaround.java
Log:
Add QPID_HOME/QPID_WORK checking to the tool itself instead of just relying on the script to vet the properties
Modified: store/branches/java/0.5-release/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreBindingsWorkaround.java
===================================================================
--- store/branches/java/0.5-release/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreBindingsWorkaround.java 2010-01-20 10:16:49 UTC (rev 3811)
+++ store/branches/java/0.5-release/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreBindingsWorkaround.java 2010-01-20 15:35:06 UTC (rev 3812)
@@ -59,6 +59,18 @@
public static void main(String[] args) throws Configuration.InitException
{
+ if(System.getProperty("QPID_HOME") == null)
+ {
+ _logger.error("QPID_HOME system property is not set. Exiting");
+ System.exit(1);
+ }
+
+ if(System.getProperty("QPID_WORK") == null)
+ {
+ _logger.error("QPID_WORK system property is not set. Exiting");
+ System.exit(1);
+ }
+
BDBStoreBindingsWorkaround tool = new BDBStoreBindingsWorkaround(args);
try
14 years, 11 months
rhmessaging commits: r3811 - in store/branches/java/0.5-release: src and 8 other directories.
by rhmessaging-commits@lists.jboss.org
Author: rgemmell
Date: 2010-01-20 05:16:49 -0500 (Wed, 20 Jan 2010)
New Revision: 3811
Added:
store/branches/java/0.5-release/java.testprofile
store/branches/java/0.5-release/src/systests/
store/branches/java/0.5-release/src/systests/java/
store/branches/java/0.5-release/src/systests/java/org/
store/branches/java/0.5-release/src/systests/java/org/apache/
store/branches/java/0.5-release/src/systests/java/org/apache/qpid/
store/branches/java/0.5-release/src/systests/java/org/apache/qpid/server/
store/branches/java/0.5-release/src/systests/java/org/apache/qpid/server/store/
store/branches/java/0.5-release/src/systests/java/org/apache/qpid/server/store/berkeleydb/
store/branches/java/0.5-release/src/systests/java/org/apache/qpid/server/store/berkeleydb/BDBStoreBindingsWorkaroundSystemTest.java
Modified:
store/branches/java/0.5-release/build.xml
Log:
Add a systest for the bindings workaround tool. Extend build.xml to allow starting a full/external broker.
Modified: store/branches/java/0.5-release/build.xml
===================================================================
--- store/branches/java/0.5-release/build.xml 2010-01-20 10:15:23 UTC (rev 3810)
+++ store/branches/java/0.5-release/build.xml 2010-01-20 10:16:49 UTC (rev 3811)
@@ -8,6 +8,7 @@
<property name="src.tools.dir" location="src/tools/java"/>
<property name="src.main.dir" location="src/main/java"/>
<property name="src.test.dir" location="src/test/java"/>
+ <property name="src.systests.dir" location="src/systests/java"/>
<property name="build.dir" location="build"/>
<property name="lib.dir" location="lib"/>
<property name="bin.dir" location="bin"/>
@@ -21,6 +22,7 @@
<property name="build.classes" location="build/classes"/>
<property name="build.test.classes" location="build/test/classes"/>
+ <property name="build.systests.classes" location="build/systests/classes"/>
<property name="build.tools.classes" location="build/tools/classes"/>
<property name="build.results" location="build/results"/>
<property name="build.failed" location="${build.results}/FAILED"/>
@@ -38,6 +40,14 @@
<available property="src.test.dir.exists" file="${src.test.dir}"/>
+ <condition property="config" value="${profile}.testprofile" else="default.testprofile">
+ <and>
+ <isset property="profile"/>
+ <available file="${project.root}/${profile}.testprofile" type="file"/>
+ </and>
+ </condition>
+
+ <property file="${project.root}/${config}"/>
<property file="${project.root}/default.testprofile"/>
<path id="class.path">
@@ -59,10 +69,18 @@
<pathelement path="${build.tools.classes}"/>
<pathelement path="${build.test.classes}"/>
</path>
+
+ <path id="systests.class.path">
+ <path refid="class.path"/>
+ <pathelement path="${build.classes}"/>
+ <pathelement path="${build.tools.classes}"/>
+ <pathelement path="${build.systests.classes}"/>
+ </path>
<target name="init">
<mkdir dir="${build.classes}"/>
<mkdir dir="${build.test.classes}"/>
+ <mkdir dir="${build.systests.classes}"/>
<mkdir dir="${build.tools.classes}"/>
<mkdir dir="${build.results}"/>
</target>
@@ -86,6 +104,12 @@
destdir="${build.test.classes}"
classpathref="test.class.path" debug="on"/>
</target>
+
+ <target name="build-systests" depends="init,build-main">
+ <javac srcdir="${src.systests.dir}"
+ destdir="${build.systests.classes}"
+ classpathref="systests.class.path" debug="on"/>
+ </target>
<target name="build-tools" depends="init,build-main">
<javac srcdir="${src.tools.dir}"
@@ -156,7 +180,59 @@
<fail if="failed" message="TEST SUITE FAILED"/>
</target>
+
+
+ <target name="systests" depends="build-systests,prepare-tests" if="src.test.dir.exists"
+ unless="${dontruntest}" description="execute unit tests">
+ <delete file="${build.failed}"/>
+
+ <junit fork="${test.fork}" maxmemory="${test.mem}" reloading="no"
+ haltonfailure="${haltonfailure}" haltonerror="${haltonerror}"
+ failureproperty="test.failures" printsummary="on" timeout="600000" >
+ <sysproperty key="amqj.logging.level" value="${amqj.logging.level}"/>
+ <sysproperty key="root.logging.level" value="${root.logging.level}"/>
+ <sysproperty key="log4j.configuration" value="${log4j.configuration}"/>
+ <sysproperty key="java.naming.factory.initial" value="${java.naming.factory.initial}"/>
+ <sysproperty key="java.naming.provider.url" value="${java.naming.provider.url}"/>
+ <sysproperty key="broker" value="${broker}"/>
+ <sysproperty key="broker.clean" value="${broker.clean}"/>
+ <sysproperty key="broker.version" value="${broker.version}"/>
+ <sysproperty key="broker.ready" value="${broker.ready}" />
+ <sysproperty key="test.excludes" value="${test.excludes}"/>
+ <sysproperty key="test.excludesfile" value="${test.excludesfile}"/>
+ <sysproperty key="max_prefetch" value ="${max_prefetch}"/>
+ <sysproperty key="example.plugin.target" value="${project.root}/build/lib/plugins"/>
+ <sysproperty key="QPID_HOME" value="${project.root}/build"/>
+ <sysproperty key="QPID_WORK" value="${project.root}/build/test-work"/>
+ <sysproperty key="test.excludes" value="false"/>
+
+
+ <formatter type="plain"/>
+ <formatter type="xml"/>
+
+ <classpath refid="systests.class.path"/>
+
+ <batchtest fork="${test.fork}" todir="${build.results}">
+ <fileset dir="${src.systests.dir}" excludes="${module.test.excludes}">
+ <include name="**/${test}.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+
+ <antcall target="touch-failed"/>
+
+ <condition property="failed">
+ <and>
+ <isfalse value="${test.failures.ignore}"/>
+ <available file="${build.failed}"/>
+ </and>
+ </condition>
+
+ <fail if="failed" message="TEST SUITE FAILED"/>
+
+ </target>
+
<target name="touch-failed" if="test.failures">
<touch file="${build.failed}"/>
</target>
Added: store/branches/java/0.5-release/java.testprofile
===================================================================
--- store/branches/java/0.5-release/java.testprofile (rev 0)
+++ store/branches/java/0.5-release/java.testprofile 2010-01-20 10:16:49 UTC (rev 3811)
@@ -0,0 +1,24 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+broker.language=java
+broker=${project.root}/build/bin/qpid-server -p @PORT -m @MPORT -c @CONFIG_FILE
+broker.clean=${project.root}/clean-dir ${build.data}
+broker.ready=Qpid Broker Ready
+
+test.excludesfile=${project.root}/ExcludeList ${project.root}/XAExcludeList ${project.root}/08ExcludeList-nonvm
Added: store/branches/java/0.5-release/src/systests/java/org/apache/qpid/server/store/berkeleydb/BDBStoreBindingsWorkaroundSystemTest.java
===================================================================
--- store/branches/java/0.5-release/src/systests/java/org/apache/qpid/server/store/berkeleydb/BDBStoreBindingsWorkaroundSystemTest.java (rev 0)
+++ store/branches/java/0.5-release/src/systests/java/org/apache/qpid/server/store/berkeleydb/BDBStoreBindingsWorkaroundSystemTest.java 2010-01-20 10:16:49 UTC (rev 3811)
@@ -0,0 +1,336 @@
+package org.apache.qpid.server.store.berkeleydb;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.LineNumberReader;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import javax.management.MBeanServerConnection;
+import javax.management.MBeanServerInvocationHandler;
+import javax.management.ObjectName;
+import javax.management.openmbean.TabularData;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+
+import org.apache.qpid.server.exchange.ManagedExchange;
+import org.apache.qpid.server.management.ManagedBroker;
+import org.apache.qpid.test.utils.QpidTestCase;
+
+public class BDBStoreBindingsWorkaroundSystemTest extends QpidTestCase
+{
+ private static final String QPID_HOME = "QPID_HOME";
+ private static final String QPID_WORK = "QPID_WORK";
+ private static final String WORKAROUND_COMPLETE = "Workaround process complete";
+
+ private static final int JMX_PORT = 8999;
+ private static final String JMX_USER = "admin";
+ private static final String JMX_PASS = "admin";
+ private static final String VHOST = "test";
+ private static final String EXCHANGE = "amq.direct";
+ private static final String CMD = System.getProperty("QPID_HOME") + File.separator + "bin"
+ + File.separator + "bindingsWorkaround.sh";
+
+ private static final String CONFIG = System.getProperty("QPID_HOME") + File.separator + "etc"
+ + File.separator + "persistent_config.xml";
+
+ private File BDB_DIR;
+ private JMXConnector _jmxc;
+ private MBeanServerConnection _mbsc;
+
+ public void setUp() throws Exception
+ {
+ if(System.getProperty(QPID_HOME) == null)
+ {
+ fail("QPID_HOME is not set");
+ }
+
+ if(System.getProperty(QPID_WORK) == null)
+ {
+ fail("QPID_WORK is not set");
+ }
+
+ _configFile = new File(System.getProperty(QPID_HOME) + File.separator + "etc" + File.separator + "persistent_config.xml");
+
+ BDB_DIR = new File(System.getProperty(QPID_WORK) + File.separator + "bdbstore");
+
+ if (BDB_DIR.exists())
+ {
+ if(!deleteDirectory(BDB_DIR))
+ {
+ fail("Unable to clean existing BDB directory");
+ }
+ }
+
+ super.setUp();
+ }
+
+ public void tearDown() throws Exception
+ {
+ closeJMXConnection();
+
+ super.tearDown();
+
+ if (BDB_DIR.exists())
+ {
+ deleteDirectory(BDB_DIR);
+ }
+ }
+
+ private void openJMXConnection() throws Exception
+ {
+ JMXServiceURL jmxUrl = new JMXServiceURL(
+ "service:jmx:rmi:///jndi/rmi://" + "localhost" + ":" + JMX_PORT + "/jmxrmi");
+
+ //Add user credential's to environment map for RMIConnector startup.
+ //These will be used for authentication by the remote RMIConnectorServer if supported,
+ //or ignored otherwise.
+ Map<String, Object> env = new HashMap<String, Object>();
+ env.put(JMXConnector.CREDENTIALS, new String[] {JMX_USER,JMX_PASS});
+
+ _jmxc = JMXConnectorFactory.connect(jmxUrl, env);
+ _mbsc = _jmxc.getMBeanServerConnection();
+ }
+
+ private void closeJMXConnection()
+ {
+ try
+ {
+ _jmxc.close();
+ }
+ catch (IOException e)
+ {
+ //ignore
+ }
+ }
+
+ private ManagedExchange getExchangeMBean() throws Exception
+ {
+ ObjectName exchangeObjectName = new ObjectName(
+ "org.apache.qpid:" +
+ "type=VirtualHost.Exchange," +
+ "VirtualHost=" + VHOST + "," +
+ "name=" + EXCHANGE + "," +
+ "ExchangeType=direct,*");
+
+ Set<ObjectName> exchanges = _mbsc.queryNames(exchangeObjectName, null);
+
+ if(exchanges.size() == 0)
+ {
+ fail("Did not find the MBean for Exchange: " + EXCHANGE);
+ }
+
+ //create the MBean proxy
+ ManagedExchange managedExchange = (ManagedExchange) MBeanServerInvocationHandler.newProxyInstance(
+ _mbsc, (ObjectName) exchanges.toArray()[0], ManagedExchange.class, false);
+
+ return managedExchange;
+ }
+
+ private ManagedBroker getVhostManagerMBean() throws Exception
+ {
+ ObjectName hostManagerObjectName = new ObjectName(
+ "org.apache.qpid:" +
+ "type=VirtualHost.VirtualHostManager," +
+ "VirtualHost=" + VHOST + ",*");
+
+ Set<ObjectName> vhostManagers = _mbsc.queryNames(hostManagerObjectName, null);
+
+ if(vhostManagers.size() == 0)
+ {
+ //The vhostManager MBean wasnt found
+ fail("Failed to find Vhost Manager MBean");
+ }
+
+ ManagedBroker vhostManager = (ManagedBroker) MBeanServerInvocationHandler.newProxyInstance(
+ _mbsc, (ObjectName) vhostManagers.toArray()[0], ManagedBroker.class, false);
+
+ return vhostManager;
+ }
+
+ private void runWorkaroundTool() throws Exception
+ {
+
+ ProcessBuilder pb = new ProcessBuilder((CMD + " -c " + CONFIG).split("\\s+"));
+ pb.redirectErrorStream(true);
+
+ Map<String, String> env = pb.environment();
+
+ String qpidHome = System.getProperty(QPID_HOME);
+ env.put(QPID_HOME, qpidHome);
+
+ //Augment Path with bin directory in QPID_HOME.
+ env.put("PATH", env.get("PATH").concat(File.pathSeparator + qpidHome + "/bin"));
+
+ Process process = pb.start();
+
+ Piper p = new Piper(process.getInputStream(),WORKAROUND_COMPLETE);
+
+ p.start();
+
+ if (!p.await(10, TimeUnit.SECONDS))
+ {
+ fail("Tool has not yet reported successful completion");
+ }
+
+ try
+ {
+ //Hack: wait 1sec to give time for the VirtualHosts to close
+ //and the JVM to exit after the tool reports its completion.
+ Thread.sleep(1000);
+
+ int exit = process.exitValue();
+ if(exit != 0)
+ {
+ fail("Workaround tool exited in an error state");
+ }
+ }
+ catch (IllegalThreadStateException e)
+ {
+ fail("Workaround tool has not yet exited");
+ }
+ }
+
+
+ public void testWorkaroundTool() throws Exception
+ {
+ openJMXConnection();
+
+ ManagedBroker vhostManager = getVhostManagerMBean();
+ ManagedExchange managedExchange = getExchangeMBean();
+
+ //gather the current exchange bindings count
+ TabularData bindings = managedExchange.bindings();
+ int origBindingsCount = bindings.size();
+
+ //create and bind new durable queue.
+ vhostManager.createNewQueue("testWorkaroundTool.Queue1", null, true);
+ managedExchange.createNewBinding("testWorkaroundTool.Queue1", "testWorkaroundTool.Queue1");
+
+ //verify the binding count increased
+ bindings = managedExchange.bindings();
+ assertEquals("No additional bindings were detected",bindings.size(), origBindingsCount +1);
+
+ closeJMXConnection();
+
+ restartBroker();
+
+ openJMXConnection();
+
+ //verify the binding count decreased because the bindings were not recovered
+ vhostManager = getVhostManagerMBean();
+ managedExchange = getExchangeMBean();
+
+ bindings = managedExchange.bindings();
+ assertEquals("The binding was recovered, expected it not to be",bindings.size(), origBindingsCount);
+
+ stopBroker();
+
+ runWorkaroundTool();
+
+ startBroker();
+
+ openJMXConnection();
+
+ //verify the binding count increased again because the bindings are now recovered.
+ vhostManager = getVhostManagerMBean();
+ managedExchange = getExchangeMBean();
+
+ bindings = managedExchange.bindings();
+ assertEquals("The binding was not recovered, expected it to be",bindings.size(), origBindingsCount+1);
+ }
+
+ public static boolean deleteDirectory(File dir)
+ {
+ if (dir.isDirectory())
+ {
+ String[] children = dir.list();
+ for (int i = 0; i < children.length; i++)
+ {
+ if (!deleteDirectory(new File(dir, children[i])))
+ {
+ return false;
+ }
+ }
+ }
+
+ return (dir.delete());
+ }
+
+ private static final class Piper extends Thread
+ {
+
+ private LineNumberReader in;
+ private String ready;
+ private CountDownLatch latch;
+ private boolean seenReady;
+
+ public Piper(InputStream in, String ready)
+ {
+ this.in = new LineNumberReader(new InputStreamReader(in));
+ this.ready = ready;
+ this.seenReady = false;
+ if (this.ready != null && !this.ready.equals(""))
+ {
+ this.latch = new CountDownLatch(1);
+ }
+ else
+ {
+ this.latch = null;
+ }
+ }
+
+ public Piper(InputStream in)
+ {
+ this(in, null);
+ }
+
+ public boolean await(long timeout, TimeUnit unit) throws InterruptedException
+ {
+ if (latch == null)
+ {
+ return true;
+ }
+ else
+ {
+ latch.await(timeout, unit);
+ return seenReady;
+ }
+ }
+
+ public void run()
+ {
+ try
+ {
+ String line;
+ while ((line = in.readLine()) != null)
+ {
+ System.out.println(line);
+ if (latch != null && line.contains(ready))
+ {
+ seenReady = true;
+ latch.countDown();
+ }
+ }
+ }
+ catch (IOException e)
+ {
+ // this seems to happen regularly even when
+ // exits are normal
+ }
+ finally
+ {
+ if (latch != null)
+ {
+ latch.countDown();
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
14 years, 11 months
rhmessaging commits: r3810 - store/branches/java/0.5-release.
by rhmessaging-commits@lists.jboss.org
Author: rgemmell
Date: 2010-01-20 05:15:23 -0500 (Wed, 20 Jan 2010)
New Revision: 3810
Modified:
store/branches/java/0.5-release/build.xml
Log:
Update build.xml test process to signal overall failure when individual tests fail
Modified: store/branches/java/0.5-release/build.xml
===================================================================
--- store/branches/java/0.5-release/build.xml 2010-01-19 21:25:35 UTC (rev 3809)
+++ store/branches/java/0.5-release/build.xml 2010-01-20 10:15:23 UTC (rev 3810)
@@ -23,6 +23,7 @@
<property name="build.test.classes" location="build/test/classes"/>
<property name="build.tools.classes" location="build/tools/classes"/>
<property name="build.results" location="build/results"/>
+ <property name="build.failed" location="${build.results}/FAILED"/>
<property name="project.namever" value="${project.name}-${project.version}"/>
<property name="bdbstore.jar" location="${build.dir}/qpid-bdbstore-${project.version}.jar"/>
<property name="bdbtools.jar" location="${build.dir}/qpid-bdbtools-${project.version}.jar"/>
@@ -106,7 +107,7 @@
<target name="test" depends="build-tests,prepare-tests" if="src.test.dir.exists"
unless="${dontruntest}" description="execute unit tests">
- <delete file="${module.failed}"/>
+ <delete file="${build.failed}"/>
<junit fork="${test.fork}" maxmemory="${test.mem}" reloading="no"
haltonfailure="${haltonfailure}" haltonerror="${haltonerror}"
@@ -143,12 +144,12 @@
</batchtest>
</junit>
- <!--antcall target="touch-failed"/-->
+ <antcall target="touch-failed"/>
<condition property="failed">
<and>
<isfalse value="${test.failures.ignore}"/>
- <available file="${module.failed}"/>
+ <available file="${build.failed}"/>
</and>
</condition>
@@ -156,6 +157,10 @@
</target>
+ <target name="touch-failed" if="test.failures">
+ <touch file="${build.failed}"/>
+ </target>
+
<target name="prepare" depends="jar">
<mkdir dir="${release.dir}"/>
</target>
14 years, 11 months
rhmessaging commits: r3809 - in store/trunk/cpp/tests: cluster and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2010-01-19 16:25:35 -0500 (Tue, 19 Jan 2010)
New Revision: 3809
Modified:
store/trunk/cpp/tests/cluster/cluster_tests_env.sh
store/trunk/cpp/tests/cluster/run_cluster_test
store/trunk/cpp/tests/cluster/run_cluster_tests
store/trunk/cpp/tests/new_python_tests/client_persistence.py
store/trunk/cpp/tests/run_new_python_tests
Log:
Perform checks for both corosync and openais when testing; some additional python tests using the new Python API.
Modified: store/trunk/cpp/tests/cluster/cluster_tests_env.sh
===================================================================
--- store/trunk/cpp/tests/cluster/cluster_tests_env.sh 2010-01-19 12:51:22 UTC (rev 3808)
+++ store/trunk/cpp/tests/cluster/cluster_tests_env.sh 2010-01-19 21:25:35 UTC (rev 3809)
@@ -49,25 +49,38 @@
}
-func_check_ais ()
+func_check_clustering ()
#----------------
-# Check openAIS/corosync is running and user has correct privilages
+# Check openAIS/corosync is running and user has correct privileges
# Params: None
# Returns: 0 if openAIS/corosync is running, 1 otherwise
+# Sets env var COROSYNC to 1 if corosync is running, not set otherwise
{
- id -nG | grep '\<ais\>' >/dev/null || NOGROUP="You are not a member of the ais group."
- ps -u root | grep 'aisexec\|corosync' >/dev/null || NOAISEXEC="The aisexec or corosync daemon is not running as root"
+ # Check either aisexec or corosync is running as root
+ cluster_prog=`ps -u root | grep 'aisexec\|corosync'`
+ test -n "$cluster_prog" || NODAEMON="Neither aisexec nor corosync is running as root"
+ if test -z "$NODAEMON"; then
+ # Test for corosync running
+ echo $cluster_prog | grep "aisexec" > /dev/null || COROSYNC=1
+ if test -n "$COROSYNC"; then
+ # Corosync auth test
+ user=`whoami`
+ ls /etc/corosync/uidgid.d | grep $user > /dev/null || NOAUTH="You are not authorized to use corosync."
+ else
+ # OpenAis auth test
+ id -nG | grep '\<ais\>' >/dev/null || NOAUTH="You are not a member of the ais group."
+ fi
+ fi
+
+ if test -n "$NODAEMON" -o -n "$NOAUTH"; then
+ cat <<EOF
- if test -n "$NOGROUP" -o -n "$NOAISEXEC"; then
- cat <<EOF
-
========== WARNING: NOT RUNNING CLUSTER TESTS ============
- Tests that depend on the openais library (used for clustering)
- will not be run because:
+ Cluster tests will not be run because:
- $NOGROUP
- $NOAISEXEC
+ $NODAEMON
+ $NOAUTH
==========================================================
@@ -280,7 +293,7 @@
#--- Start of script ---
func_check_required_env || exit 1 # Cannot run, exit with error
-func_check_ais || exit 0 # A warning, not a failure.
+func_check_clustering || exit 0 # A warning, not a failure.
srcdir=`dirname $0`
if test -z ${abs_srcdir}; then
Modified: store/trunk/cpp/tests/cluster/run_cluster_test
===================================================================
--- store/trunk/cpp/tests/cluster/run_cluster_test 2010-01-19 12:51:22 UTC (rev 3808)
+++ store/trunk/cpp/tests/cluster/run_cluster_test 2010-01-19 21:25:35 UTC (rev 3809)
@@ -22,4 +22,13 @@
# The GNU Lesser General Public License is available in the file COPYING.
. `dirname $0`/cluster_tests_env.sh
-sg ais -c "${CPP_CLUSTER_EXEC}"
+
+if test $COROSYNC; then
+ ${CPP_CLUSTER_EXEC}
+ RETCODE=$?
+else
+ sg ais -c "${CPP_CLUSTER_EXEC}"
+ RETCODE=$?
+fi
+
+exit $RETCODE
\ No newline at end of file
Modified: store/trunk/cpp/tests/cluster/run_cluster_tests
===================================================================
--- store/trunk/cpp/tests/cluster/run_cluster_tests 2010-01-19 12:51:22 UTC (rev 3808)
+++ store/trunk/cpp/tests/cluster/run_cluster_tests 2010-01-19 21:25:35 UTC (rev 3809)
@@ -32,8 +32,16 @@
CLUSTER_TESTS_IGNORE=${CLUSTER_TESTS_IGNORE:-"-I ${CLUSTER_TESTS_FAIL}"}
CLUSTER_TESTS=${CLUSTER_TESTS:-$*}
-sg ais -c "${PYTHON_DIR}/qpid-python-test -m cluster_tests ${CLUSTER_TESTS_IGNORE} ${CLUSTER_TESTS} -DOUTDIR=$OUTDIR"
-RETCODE=$?
+TEST_CMD="${PYTHON_DIR}/qpid-python-test -m cluster_tests ${CLUSTER_TESTS_IGNORE} ${CLUSTER_TESTS} -DOUTDIR=$OUTDIR"
+if test $COROSYNC; then
+ $TEST_CMD
+ RETCODE=$?
+else
+ sg ais -c "$TEST_CMD"
+ RETCODE=$?
+fi
+#sg ais -c "${PYTHON_DIR}/qpid-python-test -m cluster_tests ${CLUSTER_TESTS_IGNORE} ${CLUSTER_TESTS} -DOUTDIR=$OUTDIR"
+#RETCODE=$?
if test x${RETCODE} != x0; then
exit 1;
Modified: store/trunk/cpp/tests/new_python_tests/client_persistence.py
===================================================================
--- store/trunk/cpp/tests/new_python_tests/client_persistence.py 2010-01-19 12:51:22 UTC (rev 3808)
+++ store/trunk/cpp/tests/new_python_tests/client_persistence.py 2010-01-19 21:25:35 UTC (rev 3809)
@@ -20,8 +20,12 @@
# The GNU Lesser General Public License is available in the file COPYING.
from qpid.brokertest import *
-from qpid.messaging import Message
+from qpid.messaging import Empty, Message
from qmf.console import Session
+
+def storeArgs():
+ assert BrokerTest.store_lib
+ return ["--load-module", BrokerTest.store_lib]
class Qmf:
"""
@@ -69,26 +73,129 @@
def queryQueue(self, queueName, altExchangeName=None):
"""Test for the presence of an exchange, and optionally whether it has an alternate exchange set to a known value."""
return self.__query(queueName, "queue", "org.apache.qpid.broker", altExchangeName)
+
+ def queueMsgCount(self, queueName):
+ queueList = self.__session.getObjects(_class="queue", _name=queueName)
+ if len(queueList):
+ return queueList[0].msgDepth
+
+ def queueEmpty(self, queueName):
+ return self.queueMsgCount(queueName) == 0
-class AlternateExchagePropertyTests(BrokerTest):
+class StoreTest(BrokerTest):
"""
- Test the persistence of the Alternate Exchange property for exchanges and queues.
+ This subclass of BrokerTest adds some convenience test/check functions
"""
- def __args(self):
- assert BrokerTest.store_lib
- return ["--load-module", BrokerTest.store_lib]
+ def __chkEmpty(self, queue, receiver):
+ try:
+ msg = receiver.fetch(timeout=0)
+ self.assert_(False, "Queue \"%s\" not empty: found message: %s" % (queue, msg))
+ except Empty: pass
+
+ def chkMsg(self, broker, queue, msgChk, empty=False, ack=True):
+ return self.chkMsgs(broker, queue, [msgChk], empty, ack)
+
+ def chkMsgs(self, broker, queue, msgChkList, empty=False, ack=True):
+ s = broker.connect().session()
+ rcvr = s.receiver(queue + "; {create:always}", capacity=len(msgChkList))
+ try: rmList = [rcvr.fetch(timeout=0) for i in range(len(msgChkList))]
+ except Empty: self.assert_(False, "Queue \"%s\" is empty, unable to retrieve expected message %d." % (queue, i))
+ for i in range(0, len(rmList)):
+ self.assertEqual(rmList[i].content, msgChkList[i].content)
+ self.assertEqual(rmList[i].correlation_id, msgChkList[i].correlation_id)
+ if empty: self.__chkEmpty(queue, rcvr)
+ if ack:
+ s.acknowledge()
+ s.connection.close()
+ else:
+ return s
+
+class ExchangeQueueTests(StoreTest):
+ """
+ Simple tests of the broker exchange and queue types
+ """
+
+ def testDirectExchange(self):
+ """Test Direct exchange."""
+ broker = self.broker(storeArgs(), name="testDirectExchange", expect=EXPECT_EXIT_OK)
+ m1 = Message("A_Message1", durable=True, correlation_id="Msg0001")
+ m2 = Message("B_Message1", durable=True, correlation_id="Msg0002")
+ broker.send_message("a", m1)
+ broker.send_message("b", m2)
+ broker.terminate()
+
+ broker = self.broker(storeArgs(), name="testDirectExchange")
+ self.chkMsg(broker, "a", m1, True)
+ self.chkMsg(broker, "b", m2, True)
+
+ def testTopicExchange(self):
+ """Test Topic exchange."""
+ broker = self.broker(storeArgs(), name="testTopicExchange", expect=EXPECT_EXIT_OK)
+ s = broker.connect().session()
+ snd1 = s.sender("abc/key1; {create:always, node-properties:{durable:True, type:topic}}")
+ snd2 = s.sender("abc/key2; {create:always, node-properties:{durable:True, type:topic}}")
+ s.receiver("a; {create:always, node-properties:{durable:True, x-properties:{bindings:['abc/key1']}}}")
+ s.receiver("b; {create:always, node-properties:{durable:True, x-properties:{bindings:['abc/key1']}}}")
+ s.receiver("c; {create:always, node-properties:{durable:True, x-properties:{bindings:['abc/key1']}}}")
+ m1 = Message("Message1", durable=True, correlation_id="Msg0003")
+ snd1.send(m1)
+ m2 = Message("Message2", durable=True, correlation_id="Msg0004")
+ snd2.send(m2)
+ s.connection.close()
+ broker.terminate()
+
+ broker = self.broker(storeArgs(), name="testTopicExchange")
+ self.chkMsg(broker, "a", m1, True)
+ self.chkMsg(broker, "b", m1, True)
+ self.chkMsg(broker, "c", m1, True)
+
+
+ def testLVQ(self):
+ """Test LVQ."""
+ broker = self.broker(storeArgs(), name="testLVQ", expect=EXPECT_EXIT_OK)
+ ma1 = Message("A1", durable=True, correlation_id="Msg0005", properties={"qpid.LVQ_key":"A"})
+ ma2 = Message("A2", durable=True, correlation_id="Msg0006", properties={"qpid.LVQ_key":"A"})
+ mb1 = Message("B1", durable=True, correlation_id="Msg0007", properties={"qpid.LVQ_key":"B"})
+ mb2 = Message("B2", durable=True, correlation_id="Msg0008", properties={"qpid.LVQ_key":"B"})
+ mb3 = Message("B3", durable=True, correlation_id="Msg0009", properties={"qpid.LVQ_key":"B"})
+ mc1 = Message("C1", durable=True, correlation_id="Msg0010", properties={"qpid.LVQ_key":"C"})
+ broker.send_messages("lvq-test", [mb1, ma1, ma2, mb2, mb3, mc1], xprops="\"qpid.last_value_queue\":True")
+ broker.terminate()
+
+ broker = self.broker(storeArgs(), name="testLVQ", expect=EXPECT_EXIT_OK)
+ s = self.chkMsgs(broker, "lvq-test", [ma2, mb3, mc1], empty=True, ack=False)
+ # Add more messages while subscriber is active (no replacement):
+ ma3 = Message("A3", durable=True, correlation_id="Msg0011", properties={"qpid.LVQ_key":"A"})
+ ma4 = Message("A4", durable=True, correlation_id="Msg0012", properties={"qpid.LVQ_key":"A"})
+ mc2 = Message("C2", durable=True, correlation_id="Msg0013", properties={"qpid.LVQ_key":"C"})
+ mc3 = Message("C3", durable=True, correlation_id="Msg0014", properties={"qpid.LVQ_key":"C"})
+ mc4 = Message("C4", durable=True, correlation_id="Msg0015", properties={"qpid.LVQ_key":"C"})
+ broker.send_messages("lvq-test", [mc2, mc3, ma3, ma4, mc4], xprops="\"qpid.last_value_queue\":True", session=s)
+ s.acknowledge()
+ s.connection.close()
+ broker.terminate()
+
+ broker = self.broker(storeArgs(), name="testLVQ")
+ self.chkMsgs(broker, "lvq-test", [mc4, ma4], True)
+
+
+class AlternateExchagePropertyTests(StoreTest):
+ """
+ Test the persistence of the Alternate Exchange property for exchanges and queues.
+ """
+
def testExchange(self):
"""Exchange alternate exchange property persistence test"""
- broker = self.broker(self.__args(), name="testBroker", expect=EXPECT_EXIT_FAIL)
+ broker = self.broker(storeArgs(), name="testBroker", expect=EXPECT_EXIT_OK)
qmf = Qmf(broker)
qmf.addExchange("altExch", "direct", durable=True) # Serves as alternate exchange instance
qmf.addExchange("testExch", "direct", durable=True, altExchangeName="altExch")
- broker.kill()
+ broker.terminate()
- broker = self.broker(self.__args(), name="testBroker")
+ broker = self.broker(storeArgs(), name="testBroker")
qmf = Qmf(broker)
try: qmf.addExchange("altExch", "direct", passive=True)
except Exception, e: self.fail("Alternate exchange (\"altExch\") instance not recovered: %s" % e)
@@ -98,13 +205,13 @@
def testQueue(self):
"""Queue alternate exchange property persistexchangeNamece test"""
- broker = self.broker(self.__args(), name="testBroker", expect=EXPECT_EXIT_FAIL)
+ broker = self.broker(storeArgs(), name="testBroker", expect=EXPECT_EXIT_OK)
qmf = Qmf(broker)
qmf.addExchange("altExch", "direct", durable=True) # Serves as alternate exchange instance
qmf.addQueue("testQueue", durable=True, altExchangeName="altExch")
- broker.kill()
+ broker.terminate()
- broker = self.broker(self.__args(), name="testBroker")
+ broker = self.broker(storeArgs(), name="testBroker")
qmf = Qmf(broker)
try: qmf.addExchange("altExch", "direct", passive=True)
except Exception, e: self.fail("Alternate exchange (\"altExch\") instance not recovered: %s" % e)
@@ -113,24 +220,22 @@
self.assertTrue(qmf.queryQueue("testQueue", altExchangeName = "altExch"), "Alternate exchange property not found or is incorrect on queue \"testQueue\".")
-class RedeliveredTests(BrokerTest):
+class RedeliveredTests(StoreTest):
"""
Test the behavior of the redelivered flag in the context of persistence
"""
-
- def __args(self):
- assert BrokerTest.store_lib
- return ["--load-module", BrokerTest.store_lib]
def testBrokerRecovery(self):
"""Test that the redelivered flag is set on messages after recovery of broker"""
- broker = self.broker(self.__args(), name="testAfterRecover", expect=EXPECT_EXIT_FAIL)
+ broker = self.broker(storeArgs(), name="testAfterRecover", expect=EXPECT_EXIT_OK)
mc = "xyz"*100
m = Message(mc, durable=True)
broker.send_message("testQueue", m)
- broker.kill()
- broker = self.broker(self.__args(), name="testAfterRecover")
+ broker.terminate()
+
+ broker = self.broker(storeArgs(), name="testAfterRecover")
rm = broker.get_message("testQueue")
self.assertEqual(mc, rm.content)
self.assertTrue(rm.redelivered)
-
\ No newline at end of file
+
+
\ No newline at end of file
Modified: store/trunk/cpp/tests/run_new_python_tests
===================================================================
--- store/trunk/cpp/tests/run_new_python_tests 2010-01-19 12:51:22 UTC (rev 3808)
+++ store/trunk/cpp/tests/run_new_python_tests 2010-01-19 21:25:35 UTC (rev 3809)
@@ -43,6 +43,8 @@
OUTDIR=new_python_tests.tmp
rm -rf $OUTDIR
+# To debug a test, add the following options to the end of the following line:
+# -v DEBUG -c qpid.messaging.io.ops [*.testName]
${PYTHON_DIR}/qpid-python-test -m new_python_tests -I ${FAILING_PYTHON_TESTS} ${PYTHON_TESTS} -DOUTDIR=$OUTDIR
RETCODE=$?
14 years, 11 months
rhmessaging commits: r3808 - in store/trunk/cpp/tests: old_python_tests and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2010-01-19 07:51:22 -0500 (Tue, 19 Jan 2010)
New Revision: 3808
Modified:
store/trunk/cpp/tests/old_python_tests/flow_to_disk.py
store/trunk/cpp/tests/run_old_python_tests
store/trunk/cpp/tests/tests_env.sh
Log:
Changed use of python uuid lib to internal qpid version of uuid as uuid is not available in RHEL-5; Improved some fail messages to make them less ambiguous; Fixed the python enviroment and enviroment check.
Modified: store/trunk/cpp/tests/old_python_tests/flow_to_disk.py
===================================================================
--- store/trunk/cpp/tests/old_python_tests/flow_to_disk.py 2010-01-18 18:58:17 UTC (rev 3807)
+++ store/trunk/cpp/tests/old_python_tests/flow_to_disk.py 2010-01-19 12:51:22 UTC (rev 3808)
@@ -19,11 +19,11 @@
#
# The GNU Lesser General Public License is available in the file COPYING.
-import random, time, uuid
+import random, time
from qpid.client import Client, Closed
from qpid.queue import Empty
from qpid.testlib import TestBase010
-from qpid.datatypes import Message, RangedSet
+from qpid.datatypes import Message, RangedSet, uuid4
from qpid.session import SessionException
class FlowToDiskTests(TestBase010):
@@ -94,7 +94,7 @@
return msg
def _makeXid(self):
- return self.session.xid(format=0, global_id=uuid.uuid4().bytes, branch_id="")
+ return self.session.xid(format=0, global_id=uuid4().bytes, branch_id="")
def _produceDirect(self, queueName, deliveryMode, numMsgs, msgSize, txnProduce):
if txnProduce:
Modified: store/trunk/cpp/tests/run_old_python_tests
===================================================================
--- store/trunk/cpp/tests/run_old_python_tests 2010-01-18 18:58:17 UTC (rev 3807)
+++ store/trunk/cpp/tests/run_old_python_tests 2010-01-19 12:51:22 UTC (rev 3808)
@@ -78,11 +78,11 @@
start_broker() {
${QPIDD} --daemon --port 0 --no-module-dir --load-module=${STORE_LIB} --data-dir=${STORE_DIR} --auth=no --log-enable info+ --log-to-file ${STORE_DIR}/broker.python-test.log > qpidd.port
LOCAL_PORT=`cat qpidd.port`
- echo "run_python_tests: Started qpidd on port ${LOCAL_PORT}"
+ echo "run_old_python_tests: Started qpidd on port ${LOCAL_PORT}"
}
stop_broker() {
- echo "run_python_tests: Stopping broker on port ${LOCAL_PORT}"
+ echo "run_old_python_tests: Stopping broker on port ${LOCAL_PORT}"
${QPIDD} -q --port ${LOCAL_PORT}
}
@@ -90,7 +90,7 @@
# Run all python tests
start_broker
-$QPID_PYTHON_DIR/qpid-python-test -m old_python_tests -b localhost:$LOCAL_PORT -I ${FAILING_PYTHON_TESTS} ${PYTHON_TESTS} || { echo "FAIL python tests"; fail=1; }
+$QPID_PYTHON_DIR/qpid-python-test -m old_python_tests -b localhost:$LOCAL_PORT -I ${FAILING_PYTHON_TESTS} ${PYTHON_TESTS} || { echo "FAIL: old_python_tests"; fail=1; }
stop_broker || fail=1
exit ${fail}
Modified: store/trunk/cpp/tests/tests_env.sh
===================================================================
--- store/trunk/cpp/tests/tests_env.sh 2010-01-18 18:58:17 UTC (rev 3807)
+++ store/trunk/cpp/tests/tests_env.sh 2010-01-19 12:51:22 UTC (rev 3808)
@@ -232,7 +232,6 @@
#--- Start of script ---
func_check_required_env || exit 1 # Cannot run, exit with error
-func_check_qpid_python || exit 0 # A warning, not a failure.
srcdir=`dirname $0`
if test -z ${abs_srcdir}; then
@@ -240,6 +239,7 @@
fi
func_set_env
+func_check_qpid_python || exit 0 # A warning, not a failure.
func_mk_data_dir
# Check expected environment vars are set
14 years, 11 months
rhmessaging commits: r3807 - mgmt/trunk/wooly/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-01-18 13:58:17 -0500 (Mon, 18 Jan 2010)
New Revision: 3807
Modified:
mgmt/trunk/wooly/python/wooly/util.py
Log:
Fix imports
Modified: mgmt/trunk/wooly/python/wooly/util.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/util.py 2010-01-18 18:56:46 UTC (rev 3806)
+++ mgmt/trunk/wooly/python/wooly/util.py 2010-01-18 18:58:17 UTC (rev 3807)
@@ -4,6 +4,7 @@
import sys
import time
+from cStringIO import StringIO
from datetime import datetime
from traceback import print_exc
14 years, 11 months
rhmessaging commits: r3806 - mgmt/trunk/wooly/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-01-18 13:56:46 -0500 (Mon, 18 Jan 2010)
New Revision: 3806
Modified:
mgmt/trunk/wooly/python/wooly/__init__.py
mgmt/trunk/wooly/python/wooly/sql.py
mgmt/trunk/wooly/python/wooly/util.py
Log:
Fix import errors
Modified: mgmt/trunk/wooly/python/wooly/__init__.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/__init__.py 2010-01-18 18:39:06 UTC (rev 3805)
+++ mgmt/trunk/wooly/python/wooly/__init__.py 2010-01-18 18:56:46 UTC (rev 3806)
@@ -664,19 +664,4 @@
self.attributes = dict()
-
-class Writer(object):
- def __init__(self):
- self.writer = StringIO()
-
- def write(self, string):
- self.writer.write(string)
-
- def to_string(self):
- string = self.writer.getvalue()
-
- self.writer.close()
-
- return string
-
from pages import ResourcePage
Modified: mgmt/trunk/wooly/python/wooly/sql.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/sql.py 2010-01-18 18:39:06 UTC (rev 3805)
+++ mgmt/trunk/wooly/python/wooly/sql.py 2010-01-18 18:56:46 UTC (rev 3806)
@@ -1,3 +1,5 @@
+from copy import copy
+
from resources import *
from template import *
from util import *
Modified: mgmt/trunk/wooly/python/wooly/util.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/util.py 2010-01-18 18:39:06 UTC (rev 3805)
+++ mgmt/trunk/wooly/python/wooly/util.py 2010-01-18 18:56:46 UTC (rev 3806)
@@ -32,3 +32,17 @@
raise
else:
return self.default_factory()
+
+class Writer(object):
+ def __init__(self):
+ self.writer = StringIO()
+
+ def write(self, string):
+ self.writer.write(string)
+
+ def to_string(self):
+ string = self.writer.getvalue()
+
+ self.writer.close()
+
+ return string
14 years, 11 months
rhmessaging commits: r3805 - mgmt/trunk/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-01-18 13:39:06 -0500 (Mon, 18 Jan 2010)
New Revision: 3805
Modified:
mgmt/trunk/cumin/python/cumin/grid/slot.py
mgmt/trunk/cumin/python/cumin/grid/slot.strings
Log:
Remove jid from code and javascript.
Modified: mgmt/trunk/cumin/python/cumin/grid/slot.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/slot.py 2010-01-15 19:57:37 UTC (rev 3804)
+++ mgmt/trunk/cumin/python/cumin/grid/slot.py 2010-01-18 18:39:06 UTC (rev 3805)
@@ -373,7 +373,7 @@
return state
class SlotInfo(ItemSet):
- display_names = {"jid": "jid", "job_id": "Job ID",
+ display_names = {"job_id": "Job ID",
"system": "System", "machine": "Machine",
"state": "State", "activity": "Activity",
"name": "Name"}
@@ -432,11 +432,10 @@
return item[1]
def render_item_job_id(self, session, item):
- #return item[0] == "jid" and "id='job_id'" or ""
return item[0] == "Job ID" and "id='job_id'" or ""
def render_item_row_class(self, session, item):
- return item[0] == "jid" and "class='hidden_row'" or ""
+ return ""
class SlotActivities(ItemSet):
activities = (("Idle", "clear"),
Modified: mgmt/trunk/cumin/python/cumin/grid/slot.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/slot.strings 2010-01-15 19:57:37 UTC (rev 3804)
+++ mgmt/trunk/cumin/python/cumin/grid/slot.strings 2010-01-18 18:39:06 UTC (rev 3805)
@@ -641,20 +641,11 @@
var for_jid = null;
if (oInfo) {
oInfo.style.display = "none";
- if (oInfo.for_jid) {
- for_jid = oInfo.for_jid;
- oInfo.for_jid = null;
- }
}
wooly.updatePage(xhtml);
var oInfo = $(slot_info_id);
if (oInfo) {
oInfo.click_index = args.index;
- oInfo.for_jid = null;
- if (for_jid) {
- clicks.doClick(for_jid.x, for_jid.y);
- return;
- }
document.body.appendChild(oInfo); // so position is absolute to entire page
@@ -742,27 +733,10 @@
var click_info = vis.get_index(x, y);
var oInfo = $(slot_info_id);
if (oInfo && click_info) {
- if ((typeof oInfo.click_index != "undefined") &&
- (oInfo.click_index == click_info.index)) {
- // we already fetched the info for this slot
- var oInfoCell = document.getElementById("job_id");
- if (oInfoCell) {
- var jid = oInfoCell.innerHTML;
- if (jid != "") {
- go_to_job(jid);
- return false;
- }
- }
- } else {
- // fetch the slot info so we can get the job id
- oInfo.for_jid = {fetching: true, x: x, y: y};
- vis.fire_slot_info(click_info.index);
- }
+ // fetch the slot info so we can get the job id
+ oInfo.for_jid = {fetching: true, x: x, y: y};
+ vis.fire_slot_info(click_info.index);
}
- function go_to_job(jid) {
- var url = show_slot_job_url.replace("XXX", jid+"");
- window.location.href = url;
- }
}
}
14 years, 11 months