modules/common/cassandra-ccm/cassandra-ccm-arquillian/src/main/java/org/rhq/cassandra/ccm/arquillian/CCMSuiteDeploymentExtension.java | 44 ++++------ modules/common/cassandra-ccm/cassandra-ccm-core/src/main/java/org/rhq/cassandra/ClusterInitService.java | 36 +++----- modules/common/cassandra-ccm/cassandra-ccm-testng/src/main/java/org/rhq/cassandra/CCMTestNGListener.java | 36 +++----- modules/enterprise/server/itests-2/pom.xml | 8 + modules/helpers/metrics-simulator/src/main/java/org/rhq/metrics/simulator/Simulator.java | 36 +++----- 5 files changed, 70 insertions(+), 90 deletions(-)
New commits: commit a8003000c0017c7726a9dd2934b25df1d9be4f27 Author: Thomas Segismont tsegismo@redhat.com Date: Fri Aug 30 13:07:16 2013 +0200
Fix itests-2 suite: Missing picket box test dep, obfuscated password and wrong cluster init wait period
diff --git a/modules/common/cassandra-ccm/cassandra-ccm-arquillian/src/main/java/org/rhq/cassandra/ccm/arquillian/CCMSuiteDeploymentExtension.java b/modules/common/cassandra-ccm/cassandra-ccm-arquillian/src/main/java/org/rhq/cassandra/ccm/arquillian/CCMSuiteDeploymentExtension.java index c52f778..d051d9d 100644 --- a/modules/common/cassandra-ccm/cassandra-ccm-arquillian/src/main/java/org/rhq/cassandra/ccm/arquillian/CCMSuiteDeploymentExtension.java +++ b/modules/common/cassandra-ccm/cassandra-ccm-arquillian/src/main/java/org/rhq/cassandra/ccm/arquillian/CCMSuiteDeploymentExtension.java @@ -1,26 +1,20 @@ /* + * RHQ Management Platform + * Copyright (C) 2005-2013 Red Hat, Inc. + * All rights reserved. * - * * RHQ Management Platform - * * Copyright (C) 2005-2012 Red Hat, Inc. - * * All rights reserved. - * * - * * This program is free software; you can redistribute it and/or modify - * * it under the terms of the GNU General Public License, version 2, as - * * published by the Free Software Foundation, and/or the GNU Lesser - * * General Public License, version 2.1, also as published by the Free - * * Software Foundation. - * * - * * This program is distributed in the hope that it will be useful, - * * but WITHOUT ANY WARRANTY; without even the implied warranty of - * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * * GNU General Public License and the GNU Lesser General Public License - * * for more details. - * * - * * You should have received a copy of the GNU General Public License - * * and the GNU Lesser General Public License along with this program; - * * if not, write to the Free Software Foundation, Inc., - * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation version 2 of the License. * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
package org.rhq.cassandra.ccm.arquillian; @@ -125,7 +119,7 @@ public class CCMSuiteDeploymentExtension implements LoadableExtension { File clusterDir = new File(basedir, "cassandra");
options.setUsername("rhqadmin"); - options.setPassword("rhqadmin"); + options.setPassword("1eeb2f255e832171df8592078de921bc"); options.setClusterDir(clusterDir.getAbsolutePath()); options.setHeapSize("256M"); options.setHeapNewSize("64M"); @@ -141,8 +135,8 @@ public class CCMSuiteDeploymentExtension implements LoadableExtension { ccm.startCluster(false);
try { - clusterInitService.waitForClusterToStart(nodes, jmxPorts, nodes.length, 20, 5, 1500); - schemaManager = new SchemaManager("rhqadmin", "rhqadmin", nodes, cqlPort); + clusterInitService.waitForClusterToStart(nodes, jmxPorts, nodes.length, 2000, 20, 10); + schemaManager = new SchemaManager("rhqadmin", "1eeb2f255e832171df8592078de921bc", nodes, cqlPort);
} catch (Exception e) { if (null != ccm) { @@ -159,7 +153,7 @@ public class CCMSuiteDeploymentExtension implements LoadableExtension { cqlPort = Integer.parseInt(cqlPortString);
//jmxPorts = parseNodeJmxPorts(seed); - schemaManager = new SchemaManager("rhqadmin", "rhqadmin", nodes, cqlPort); + schemaManager = new SchemaManager("rhqadmin", "1eeb2f255e832171df8592078de921bc", nodes, cqlPort);
} catch (Exception e) { throw new RuntimeException("External Cassandra initialization failed", e); @@ -272,4 +266,4 @@ public class CCMSuiteDeploymentExtension implements LoadableExtension { } } } -} \ No newline at end of file +} diff --git a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/java/org/rhq/cassandra/ClusterInitService.java b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/java/org/rhq/cassandra/ClusterInitService.java index cbbfad5..d2bb984 100644 --- a/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/java/org/rhq/cassandra/ClusterInitService.java +++ b/modules/common/cassandra-ccm/cassandra-ccm-core/src/main/java/org/rhq/cassandra/ClusterInitService.java @@ -1,26 +1,20 @@ /* + * RHQ Management Platform + * Copyright (C) 2005-2013 Red Hat, Inc. + * All rights reserved. * - * * RHQ Management Platform - * * Copyright (C) 2005-2012 Red Hat, Inc. - * * All rights reserved. - * * - * * This program is free software; you can redistribute it and/or modify - * * it under the terms of the GNU General Public License, version 2, as - * * published by the Free Software Foundation, and/or the GNU Lesser - * * General Public License, version 2.1, also as published by the Free - * * Software Foundation. - * * - * * This program is distributed in the hope that it will be useful, - * * but WITHOUT ANY WARRANTY; without even the implied warranty of - * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * * GNU General Public License and the GNU Lesser General Public License - * * for more details. - * * - * * You should have received a copy of the GNU General Public License - * * and the GNU Lesser General Public License along with this program; - * * if not, write to the Free Software Foundation, Inc., - * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation version 2 of the License. * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
package org.rhq.cassandra; @@ -123,7 +117,6 @@ public final class ClusterInitService { * before returning. * @param retries The number of times to retry connecting. A runtime exception will be * thrown when the number of failed connections exceeds this value. - * @param hosts The cluster nodes to which a connection should be made */ public void waitForClusterToStart(String[] storageNodes, int jmxPorts[], int numHosts, int retries) { waitForClusterToStart(storageNodes, jmxPorts, numHosts, 250, retries, 1); @@ -147,7 +140,6 @@ public final class ClusterInitService { * @param retries The number of times to retry connecting. A runtime exception will be * thrown when the number of failed connections exceeds this value. * @param initialWait The amount of seconds before first try. - * @param hosts The cluster nodes to which a connection should be made */ public void waitForClusterToStart(String[] storageNodes, int jmxPorts[], int numHosts, long delay, int retries, int initialWait) { diff --git a/modules/common/cassandra-ccm/cassandra-ccm-testng/src/main/java/org/rhq/cassandra/CCMTestNGListener.java b/modules/common/cassandra-ccm/cassandra-ccm-testng/src/main/java/org/rhq/cassandra/CCMTestNGListener.java index 5790ab6..ab58c95 100644 --- a/modules/common/cassandra-ccm/cassandra-ccm-testng/src/main/java/org/rhq/cassandra/CCMTestNGListener.java +++ b/modules/common/cassandra-ccm/cassandra-ccm-testng/src/main/java/org/rhq/cassandra/CCMTestNGListener.java @@ -1,26 +1,20 @@ /* + * RHQ Management Platform + * Copyright (C) 2005-2013 Red Hat, Inc. + * All rights reserved. * - * * RHQ Management Platform - * * Copyright (C) 2005-2012 Red Hat, Inc. - * * All rights reserved. - * * - * * This program is free software; you can redistribute it and/or modify - * * it under the terms of the GNU General Public License, version 2, as - * * published by the Free Software Foundation, and/or the GNU Lesser - * * General Public License, version 2.1, also as published by the Free - * * Software Foundation. - * * - * * This program is distributed in the hope that it will be useful, - * * but WITHOUT ANY WARRANTY; without even the implied warranty of - * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * * GNU General Public License and the GNU Lesser General Public License - * * for more details. - * * - * * You should have received a copy of the GNU General Public License - * * and the GNU Lesser General Public License along with this program; - * * if not, write to the Free Software Foundation, Inc., - * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation version 2 of the License. * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
package org.rhq.cassandra; @@ -122,7 +116,7 @@ public class CCMTestNGListener implements IInvokedMethodListener { ccm.startCluster(false);
- clusterInitService.waitForClusterToStart(nodes, jmxPorts, nodes.length, 20, 2, 10); + clusterInitService.waitForClusterToStart(nodes, jmxPorts, nodes.length, 2000, 20, 10);
SchemaManager schemaManager = new SchemaManager(annotation.username(), annotation.password(), nodes, ccm.getCqlPort()); diff --git a/modules/enterprise/server/itests-2/pom.xml b/modules/enterprise/server/itests-2/pom.xml index 0dacb1a..43afd79 100644 --- a/modules/enterprise/server/itests-2/pom.xml +++ b/modules/enterprise/server/itests-2/pom.xml @@ -34,7 +34,7 @@
<!-- cassandra connection properties --> <rhq.storage.username>rhqadmin</rhq.storage.username> - <rhq.storage.password>rhqadmin</rhq.storage.password> + <rhq.storage.password>1eeb2f255e832171df8592078de921bc</rhq.storage.password> <rhq.storage.nodes>127.0.0.1,127.0.0.2</rhq.storage.nodes> <rhq.storage.cql-port>9042</rhq.storage.cql-port> </properties> @@ -777,6 +777,12 @@ <scope>test</scope> </dependency>
+ <dependency> + <groupId>org.picketbox</groupId> + <artifactId>picketbox</artifactId> + <scope>test</scope> + </dependency> + </dependencies> </profile>
diff --git a/modules/helpers/metrics-simulator/src/main/java/org/rhq/metrics/simulator/Simulator.java b/modules/helpers/metrics-simulator/src/main/java/org/rhq/metrics/simulator/Simulator.java index a5a3994..af012dd 100644 --- a/modules/helpers/metrics-simulator/src/main/java/org/rhq/metrics/simulator/Simulator.java +++ b/modules/helpers/metrics-simulator/src/main/java/org/rhq/metrics/simulator/Simulator.java @@ -1,26 +1,20 @@ /* + * RHQ Management Platform + * Copyright (C) 2005-2013 Red Hat, Inc. + * All rights reserved. * - * * RHQ Management Platform - * * Copyright (C) 2005-2012 Red Hat, Inc. - * * All rights reserved. - * * - * * This program is free software; you can redistribute it and/or modify - * * it under the terms of the GNU General Public License, version 2, as - * * published by the Free Software Foundation, and/or the GNU Lesser - * * General Public License, version 2.1, also as published by the Free - * * Software Foundation. - * * - * * This program is distributed in the hope that it will be useful, - * * but WITHOUT ANY WARRANTY; without even the implied warranty of - * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * * GNU General Public License and the GNU Lesser General Public License - * * for more details. - * * - * * You should have received a copy of the GNU General Public License - * * and the GNU Lesser General Public License along with this program; - * * if not, write to the Free Software Foundation, Inc., - * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation version 2 of the License. * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
package org.rhq.metrics.simulator; @@ -208,7 +202,7 @@ public class Simulator implements ShutdownManager { private void waitForClusterToInitialize() { log.info("Waiting for cluster to initialize"); ClusterInitService clusterInitService = new ClusterInitService(); - clusterInitService.waitForClusterToStart(ccm.getNodes(), ccm.getJmxPorts(), ccm.getNodes().length, 20, 2, 1500); + clusterInitService.waitForClusterToStart(ccm.getNodes(), ccm.getJmxPorts(), ccm.getNodes().length, 2000, 20, 10); }
private void createSchema() {
rhq-commits@lists.fedorahosted.org