provisionr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From as...@apache.org
Subject git commit: PROVISIONR-12. Upgrade to Karaf 2.3.1
Date Thu, 20 Jun 2013 09:10:54 GMT
Updated Branches:
  refs/heads/master 256336458 -> 9c9107ac7


PROVISIONR-12. Upgrade to Karaf 2.3.1

To make this work we had to also upgrade Groovy to 2.1.5 as a single bundle
This patch also includes some minor changes that fix the activities tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-provisionr/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-provisionr/commit/9c9107ac
Tree: http://git-wip-us.apache.org/repos/asf/incubator-provisionr/tree/9c9107ac
Diff: http://git-wip-us.apache.org/repos/asf/incubator-provisionr/diff/9c9107ac

Branch: refs/heads/master
Commit: 9c9107ac7607dd38de456bf309047482daddbc11
Parents: 2563364
Author: Andrei Savu <asavu@apache.org>
Authored: Mon Jun 17 20:36:06 2013 +0300
Committer: Andrei Savu <asavu@apache.org>
Committed: Thu Jun 20 12:02:37 2013 +0300

----------------------------------------------------------------------
 activiti/commands/pom.xml                       | 11 +--
 core/src/main/resources/features.xml            |  6 +-
 karaf/assembly/src/main/assembly/bin.xml        |  2 -
 .../filtered-resources/etc/custom.properties    |  3 +-
 .../filtered-resources/etc/startup.properties   | 76 --------------------
 karaf/branding/pom.xml                          |  6 +-
 karaf/commands/pom.xml                          |  8 ++-
 parent/pom.xml                                  |  9 ++-
 .../amazon/activities/RunInstances.java         |  4 ++
 .../amazon/activities/RunOnDemandInstances.java | 19 ++---
 .../amazon/activities/CreatePoolLiveTest.java   |  5 +-
 .../activities/EnsureKeyPairExistsLiveTest.java |  2 +-
 .../RunOnDemandInstancesLiveTest.java           | 35 ++++-----
 .../test/ProvisionrLiveTestSupport.java         | 10 +--
 14 files changed, 61 insertions(+), 135 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/9c9107ac/activiti/commands/pom.xml
----------------------------------------------------------------------
diff --git a/activiti/commands/pom.xml b/activiti/commands/pom.xml
index 4cd55e1..5936677 100644
--- a/activiti/commands/pom.xml
+++ b/activiti/commands/pom.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <!--
         Copyright 2012 Cisco Systems
         
@@ -127,7 +128,7 @@
         </dependency>
         <dependency>
             <groupId>org.codehaus.groovy</groupId>
-            <artifactId>groovy</artifactId>
+            <artifactId>groovy-all</artifactId>
             <version>${groovy.version}</version>
             <scope>test</scope>
         </dependency>
@@ -166,9 +167,11 @@
                             org.activiti.karaf.commands.util
                         </Export-Package>
                         <Import-Package>
+                            org.apache.felix.service.command,
                             org.apache.felix.gogo.commands,
-                            org.apache.karaf.shell.console,
-                            org.apache.karaf.shell.console.completer,
+                            org.apache.karaf.shell.console;version="[2.2,4)",
+                            org.apache.karaf.shell.console.commands;version="[2.2,4)",
+                            org.apache.karaf.shell.console.completer;version="[2.2,4)",
                             *
                         </Import-Package>
                     </instructions>

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/9c9107ac/core/src/main/resources/features.xml
----------------------------------------------------------------------
diff --git a/core/src/main/resources/features.xml b/core/src/main/resources/features.xml
index d83d815..924a48a 100644
--- a/core/src/main/resources/features.xml
+++ b/core/src/main/resources/features.xml
@@ -23,16 +23,12 @@
 
     <feature name="activiti-karaf" version="${activiti.version}">
         <feature>transaction</feature>
-        <bundle dependency="true">
-            mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.antlr/${antlr.osgi.version}
-        </bundle>
-        <bundle dependency="true">mvn:org.eclipse.jetty.orbit/org.objectweb.asm/${asm.version}</bundle>
         <bundle dependency="true">mvn:javax.mail/mail/${java.mail.version}</bundle>
 
         <bundle dependency="true">mvn:com.h2database/h2/${h2.version}</bundle>
         <bundle dependency="true">mvn:org.mybatis/mybatis/${mybatis.version}</bundle>
 
-        <bundle dependency="true">mvn:org.codehaus.groovy/groovy/${groovy.version}</bundle>
+        <bundle dependency="true">mvn:org.codehaus.groovy/groovy-all/${groovy.version}</bundle>
 
         <bundle start="true">mvn:org.activiti/activiti-engine/${activiti.version}</bundle>
         <bundle start="true">mvn:org.activiti/activiti-osgi/${activiti.version}</bundle>

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/9c9107ac/karaf/assembly/src/main/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/karaf/assembly/src/main/assembly/bin.xml b/karaf/assembly/src/main/assembly/bin.xml
index b25ca70..d8edbbe 100644
--- a/karaf/assembly/src/main/assembly/bin.xml
+++ b/karaf/assembly/src/main/assembly/bin.xml
@@ -32,11 +32,9 @@
             <outputDirectory>/</outputDirectory>
             <excludes>
                 <exclude>**/demos/**</exclude>
-                <exclude>lib/karaf-version.jar</exclude>
                 <exclude>bin/**</exclude>
                 <exclude>etc/org.apache.karaf.features.cfg</exclude>
                 <exclude>etc/custom.properties</exclude>
-                <exclude>etc/startup.properties</exclude>
                 <!--<exclude>etc/jre.properties*</exclude>-->
                 <exclude>etc/org.apache.karaf.features.repos.cfg</exclude>
                 <exclude>readme.txt</exclude>

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/9c9107ac/karaf/assembly/src/main/filtered-resources/etc/custom.properties
----------------------------------------------------------------------
diff --git a/karaf/assembly/src/main/filtered-resources/etc/custom.properties b/karaf/assembly/src/main/filtered-resources/etc/custom.properties
index bc24d09..459bb06 100644
--- a/karaf/assembly/src/main/filtered-resources/etc/custom.properties
+++ b/karaf/assembly/src/main/filtered-resources/etc/custom.properties
@@ -28,5 +28,4 @@ karaf.systemBundlesStartLevel=50
 # You can place any customized configuration here.
 #
 
-org.osgi.framework.system.packages.extra = \
-  org.apache.karaf.branding;
+org.osgi.framework.system.packages.extra = org.apache.karaf.branding

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/9c9107ac/karaf/assembly/src/main/filtered-resources/etc/startup.properties
----------------------------------------------------------------------
diff --git a/karaf/assembly/src/main/filtered-resources/etc/startup.properties b/karaf/assembly/src/main/filtered-resources/etc/startup.properties
deleted file mode 100644
index fc67fd9..0000000
--- a/karaf/assembly/src/main/filtered-resources/etc/startup.properties
+++ /dev/null
@@ -1,76 +0,0 @@
-################################################################################
-#
-#    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.
-#
-################################################################################
-
-# This file allows you to control the start level of each bundle.
-#
-
-#
-# Startup core services like logging
-#
-org/ops4j/pax/url/pax-url-mvn/1.2.8/pax-url-mvn-1.2.8.jar=5
-org/ops4j/pax/url/pax-url-wrap/1.2.8/pax-url-wrap-1.2.8.jar=5
-org/ops4j/pax/logging/pax-logging-api/1.6.10/pax-logging-api-1.6.10.jar=8
-org/ops4j/pax/logging/pax-logging-service/1.6.10/pax-logging-service-1.6.10.jar=8
-org/apache/felix/org.apache.felix.configadmin/1.2.8/org.apache.felix.configadmin-1.2.8.jar=10
-org/apache/felix/org.apache.felix.fileinstall/3.2.4/org.apache.felix.fileinstall-3.2.4.jar=11
-
-#
-# The rest of the services..
-#
-org/apache/servicemix/bundles/org.apache.servicemix.bundles.asm/3.3.1_1/org.apache.servicemix.bundles.asm-3.3.1_1.jar=20
-org/apache/aries/org.apache.aries.util/0.3.1/org.apache.aries.util-0.3.1.jar=20
-org/apache/aries/proxy/org.apache.aries.proxy/0.3.1/org.apache.aries.proxy-0.3.1.jar=20
-org/apache/aries/blueprint/org.apache.aries.blueprint/0.3.2/org.apache.aries.blueprint-0.3.2.jar=20
-
-org/apache/karaf/shell/org.apache.karaf.shell.console/2.2.10/org.apache.karaf.shell.console-2.2.10.jar=30
-org/apache/karaf/shell/org.apache.karaf.shell.osgi/2.2.10/org.apache.karaf.shell.osgi-2.2.10.jar=30
-org/apache/karaf/shell/org.apache.karaf.shell.log/2.2.10/org.apache.karaf.shell.log-2.2.10.jar=30
-org/apache/karaf/shell/org.apache.karaf.shell.packages/2.2.10/org.apache.karaf.shell.packages-2.2.10.jar=30
-org/apache/karaf/shell/org.apache.karaf.shell.commands/2.2.10/org.apache.karaf.shell.commands-2.2.10.jar=30
-org/apache/karaf/shell/org.apache.karaf.shell.dev/2.2.10/org.apache.karaf.shell.dev-2.2.10.jar=30
-org/apache/karaf/jaas/org.apache.karaf.jaas.config/2.2.10/org.apache.karaf.jaas.config-2.2.10.jar=30
-org/apache/karaf/jaas/org.apache.karaf.jaas.modules/2.2.10/org.apache.karaf.jaas.modules-2.2.10.jar=30
-org/apache/karaf/jaas/org.apache.karaf.jaas.command/2.2.10/org.apache.karaf.jaas.command-2.2.10.jar=30
-org/apache/karaf/features/org.apache.karaf.features.core/2.2.10/org.apache.karaf.features.core-2.2.10.jar=30
-org/apache/karaf/features/org.apache.karaf.features.command/2.2.10/org.apache.karaf.features.command-2.2.10.jar=30
-org/apache/karaf/features/org.apache.karaf.features.management/2.2.10/org.apache.karaf.features.management-2.2.10.jar=30
-
-org/apache/karaf/diagnostic/org.apache.karaf.diagnostic.core/2.2.10/org.apache.karaf.diagnostic.core-2.2.10.jar=30
-org/apache/karaf/diagnostic/org.apache.karaf.diagnostic.common/2.2.10/org.apache.karaf.diagnostic.common-2.2.10.jar=30
-org/apache/karaf/diagnostic/org.apache.karaf.diagnostic.command/2.2.10/org.apache.karaf.diagnostic.command-2.2.10.jar=30
-org/apache/karaf/diagnostic/org.apache.karaf.diagnostic.management/2.2.10/org.apache.karaf.diagnostic.management-2.2.10.jar=30
-
-org/apache/karaf/management/org.apache.karaf.management.server/2.2.10/org.apache.karaf.management.server-2.2.10.jar=30
-org/apache/aries/jmx/org.apache.aries.jmx.api/0.3/org.apache.aries.jmx.api-0.3.jar=30
-org/apache/aries/jmx/org.apache.aries.jmx.core/0.3.1/org.apache.aries.jmx.core-0.3.1.jar=30
-org/apache/aries/jmx/org.apache.aries.jmx.blueprint/0.3/org.apache.aries.jmx.blueprint-0.3.jar=30
-
-org/apache/karaf/admin/org.apache.karaf.admin.core/2.2.10/org.apache.karaf.admin.core-2.2.10.jar=30
-org/apache/karaf/admin/org.apache.karaf.admin.command/2.2.10/org.apache.karaf.admin.command-2.2.10.jar=30
-org/apache/karaf/admin/org.apache.karaf.admin.management/2.2.10/org.apache.karaf.admin.management-2.2.10.jar=30
-
-org/apache/mina/mina-core/2.0.5/mina-core-2.0.5.jar=30
-org/apache/sshd/sshd-core/0.8.0/sshd-core-0.8.0.jar=30
-org/apache/karaf/shell/org.apache.karaf.shell.ssh/2.2.10/org.apache.karaf.shell.ssh-2.2.10.jar=30
-
-org/apache/karaf/deployer/org.apache.karaf.deployer.spring/2.2.10/org.apache.karaf.deployer.spring-2.2.10.jar=28
-org/apache/karaf/deployer/org.apache.karaf.deployer.blueprint/2.2.10/org.apache.karaf.deployer.blueprint-2.2.10.jar=28
-org/apache/karaf/deployer/org.apache.karaf.deployer.features/2.2.10/org.apache.karaf.deployer.features-2.2.10.jar=30
-#org/apache/karaf/deployer/org.apache.karaf.deployer.kar/2.2.10/org.apache.karaf.deployer.kar-2.2.10.jar=30
-org/apache/karaf/deployer/org.apache.karaf.deployer.wrap/2.2.10/org.apache.karaf.deployer.wrap-2.2.10.jar=30

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/9c9107ac/karaf/branding/pom.xml
----------------------------------------------------------------------
diff --git a/karaf/branding/pom.xml b/karaf/branding/pom.xml
index 6d11b96..60d18b3 100644
--- a/karaf/branding/pom.xml
+++ b/karaf/branding/pom.xml
@@ -48,10 +48,12 @@
                 <configuration>
                     <outputDirectory>${basedir}/target/classes</outputDirectory>
                     <instructions>
-                        <Export-Package>org.apache.karaf.branding</Export-Package>
+                        <Import-Package>*</Import-Package>
+                        <Private-Package>!*</Private-Package>
+                        <Export-Package>org.apache.karaf.branding;-nodefaultversion:=false</Export-Package>
                     </instructions>
                 </configuration>
             </plugin>
         </plugins>
     </build>
-</project>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/9c9107ac/karaf/commands/pom.xml
----------------------------------------------------------------------
diff --git a/karaf/commands/pom.xml b/karaf/commands/pom.xml
index 561061d..2f0241d 100644
--- a/karaf/commands/pom.xml
+++ b/karaf/commands/pom.xml
@@ -108,9 +108,11 @@
                             org.apache.provisionr.commands
                         </Export-Package>
                         <Import-Package>
+                            org.apache.felix.service.command,
                             org.apache.felix.gogo.commands,
-                            org.apache.karaf.shell.console,
-                            org.apache.karaf.shell.console.completer,
+                            org.apache.karaf.shell.console;version="[2.2,4)",
+                            org.apache.karaf.shell.console.commands;version="[2.2,4)",
+                            org.apache.karaf.shell.console.completer;version="[2.2,4)",
                             *
                         </Import-Package>
                     </instructions>
@@ -118,4 +120,4 @@
             </plugin>
         </plugins>
     </build>
-</project>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/9c9107ac/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 4f019b8..d2ea5f5 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -142,7 +142,7 @@
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <osgi.framework.version>4.2.0</osgi.framework.version>
+        <osgi.framework.version>4.3.0</osgi.framework.version>
         <activiti.version>5.10</activiti.version>
         <h2.version>1.3.168</h2.version>
         <spring.version>3.0.7.RELEASE</spring.version>
@@ -154,16 +154,15 @@
         <fest-assert.version>2.0M8</fest-assert.version>
         <pax.exam.version>2.6.0</pax.exam.version>
         <pax.url.version>1.4.0</pax.url.version>
-        <karaf.version>2.2.10</karaf.version>
+        <karaf.version>2.3.1</karaf.version>
         <cxf.version>2.7.2</cxf.version>
         <felix.version>3.2.2</felix.version>
         <felix.fileinstall.version>3.2.6</felix.fileinstall.version>
         <aws.sdk.version>1.3.14_1</aws.sdk.version>
         <mybatis.version>3.1.1</mybatis.version>
-        <groovy.version>1.8.6</groovy.version>
+        <groovy.version>2.1.5</groovy.version>
         <antlr.osgi.version>2.7.7_4</antlr.osgi.version>
         <java.mail.version>1.4.4</java.mail.version>
-        <asm.version>3.3.1.v201105211655</asm.version>
         <karaf.tooling.version>2.3.0</karaf.tooling.version>
         <tinybundles.version>1.3.1</tinybundles.version>
         <junit.osgi.version>4.10_1</junit.osgi.version>
@@ -441,7 +440,7 @@
                     <groupId>org.apache.felix</groupId>
                     <artifactId>maven-bundle-plugin</artifactId>
                     <extensions>true</extensions>
-                    <version>2.3.7</version>
+                    <version>2.3.6</version>
                 </plugin>
             </plugins>
         </pluginManagement>

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/9c9107ac/providers/amazon/src/main/java/org/apache/provisionr/amazon/activities/RunInstances.java
----------------------------------------------------------------------
diff --git a/providers/amazon/src/main/java/org/apache/provisionr/amazon/activities/RunInstances.java
b/providers/amazon/src/main/java/org/apache/provisionr/amazon/activities/RunInstances.java
index cc65fa3..6ac492f 100644
--- a/providers/amazon/src/main/java/org/apache/provisionr/amazon/activities/RunInstances.java
+++ b/providers/amazon/src/main/java/org/apache/provisionr/amazon/activities/RunInstances.java
@@ -97,8 +97,10 @@ public abstract class RunInstances extends AmazonActivity {
         if (spot) {
             Calendar validUntil = Calendar.getInstance();
             validUntil.add(Calendar.MINUTE, 10);
+
             final String spotPrice = checkNotNull(pool.getProvider().getOption(ProviderOptions.SPOT_BID),
                 "The bid for spot instances was not specified");
+
             LaunchSpecification ls = new LaunchSpecification()
                 .withInstanceType(instanceType)
                 .withKeyName(keyPairName)
@@ -106,6 +108,7 @@ public abstract class RunInstances extends AmazonActivity {
                 .withBlockDeviceMappings(blockDeviceMappings)
                 .withSecurityGroups(Lists.newArrayList(securityGroupName))
                 .withUserData(Base64.encodeBytes(userData.getBytes(Charsets.UTF_8)));
+
             return new RequestSpotInstancesRequest()
                 .withSpotPrice(spotPrice)
                 .withLaunchSpecification(ls)
@@ -113,6 +116,7 @@ public abstract class RunInstances extends AmazonActivity {
                 .withInstanceCount(pool.getExpectedSize())
                 .withType(SpotInstanceType.OneTime)
                 .withValidUntil(validUntil.getTime());
+
         } else {
             return new RunInstancesRequest()
                 .withClientToken(businessKey)

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/9c9107ac/providers/amazon/src/main/java/org/apache/provisionr/amazon/activities/RunOnDemandInstances.java
----------------------------------------------------------------------
diff --git a/providers/amazon/src/main/java/org/apache/provisionr/amazon/activities/RunOnDemandInstances.java
b/providers/amazon/src/main/java/org/apache/provisionr/amazon/activities/RunOnDemandInstances.java
index fb67313..9b70756 100644
--- a/providers/amazon/src/main/java/org/apache/provisionr/amazon/activities/RunOnDemandInstances.java
+++ b/providers/amazon/src/main/java/org/apache/provisionr/amazon/activities/RunOnDemandInstances.java
@@ -18,30 +18,25 @@
 
 package org.apache.provisionr.amazon.activities;
 
-import java.io.IOException;
-import java.util.List;
-
-import org.activiti.engine.delegate.DelegateExecution;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import com.amazonaws.services.ec2.AmazonEC2;
 import com.amazonaws.services.ec2.model.Instance;
 import com.amazonaws.services.ec2.model.RunInstancesRequest;
 import com.amazonaws.services.ec2.model.RunInstancesResult;
+import com.google.common.base.Function;
+import com.google.common.collect.Lists;
+import java.io.IOException;
+import java.util.List;
+import org.activiti.engine.delegate.DelegateExecution;
 import org.apache.provisionr.amazon.ProcessVariables;
 import org.apache.provisionr.amazon.core.ProviderClientCache;
 import org.apache.provisionr.api.pool.Pool;
-import com.google.common.base.Function;
-import com.google.common.collect.Lists;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class RunOnDemandInstances extends RunInstances {
 
     private static final Logger LOG = LoggerFactory.getLogger(RunOnDemandInstances.class);
 
-    public static final String DEFAULT_ARCH = "amd64";
-    public static final String DEFAULT_TYPE = "instance-store";
-
     public RunOnDemandInstances(ProviderClientCache cache) {
         super(cache);
     }

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/9c9107ac/providers/amazon/src/test/java/org/apache/provisionr/amazon/activities/CreatePoolLiveTest.java
----------------------------------------------------------------------
diff --git a/providers/amazon/src/test/java/org/apache/provisionr/amazon/activities/CreatePoolLiveTest.java
b/providers/amazon/src/test/java/org/apache/provisionr/amazon/activities/CreatePoolLiveTest.java
index c934fda..9ff13a7 100644
--- a/providers/amazon/src/test/java/org/apache/provisionr/amazon/activities/CreatePoolLiveTest.java
+++ b/providers/amazon/src/test/java/org/apache/provisionr/amazon/activities/CreatePoolLiveTest.java
@@ -35,6 +35,7 @@ public abstract class CreatePoolLiveTest<T extends AmazonActivity>
extends Amazo
 
     protected DelegateExecution execution;
     protected Pool pool;
+
     protected Hardware hardware;
     protected Software software;
 
@@ -57,8 +58,10 @@ public abstract class CreatePoolLiveTest<T extends AmazonActivity>
extends Amazo
         hardware = mock(Hardware.class);
         when(hardware.getType()).thenReturn("t1.micro");
         when(hardware.getBlockDevices()).thenReturn(new ArrayList<BlockDevice>());
+        when(pool.getHardware()).thenReturn(hardware);
 
         software = mock(Software.class);
+        when(pool.getSoftware()).thenReturn(software);
 
         when(pool.getProvider()).thenReturn(provider);
         when(pool.getAdminAccess()).thenReturn(adminAccess);
@@ -67,8 +70,6 @@ public abstract class CreatePoolLiveTest<T extends AmazonActivity>
extends Amazo
         when(pool.getMinSize()).thenReturn(1);
         when(pool.getExpectedSize()).thenReturn(1);
 
-        when(pool.getHardware()).thenReturn(hardware);
-
         when(execution.getProcessBusinessKey()).thenReturn(BUSINESS_KEY);
         when(execution.getVariable(CoreProcessVariables.POOL)).thenReturn(pool);
 

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/9c9107ac/providers/amazon/src/test/java/org/apache/provisionr/amazon/activities/EnsureKeyPairExistsLiveTest.java
----------------------------------------------------------------------
diff --git a/providers/amazon/src/test/java/org/apache/provisionr/amazon/activities/EnsureKeyPairExistsLiveTest.java
b/providers/amazon/src/test/java/org/apache/provisionr/amazon/activities/EnsureKeyPairExistsLiveTest.java
index e17cef2..8000e41 100644
--- a/providers/amazon/src/test/java/org/apache/provisionr/amazon/activities/EnsureKeyPairExistsLiveTest.java
+++ b/providers/amazon/src/test/java/org/apache/provisionr/amazon/activities/EnsureKeyPairExistsLiveTest.java
@@ -36,7 +36,7 @@ public class EnsureKeyPairExistsLiveTest extends AmazonActivityLiveTest<EnsureKe
     /**
      * Computed in an Amazon specific way
      */
-    public static final String TEST_KEY_FINGERPRINT = "0e:2f:16:f4:15:a3:80:e8:c5:1a:8b:85:e4:fe:69:fa";
+    public static final String TEST_KEY_FINGERPRINT = "6f:05:94:d8:97:a0:ce:4a:31:d1:3c:1b:f6:ed:31:6b";
 
     private final String KEYPAIR_NAME = KeyPairs.formatNameFromBusinessKey(BUSINESS_KEY);
 

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/9c9107ac/providers/amazon/src/test/java/org/apache/provisionr/amazon/activities/RunOnDemandInstancesLiveTest.java
----------------------------------------------------------------------
diff --git a/providers/amazon/src/test/java/org/apache/provisionr/amazon/activities/RunOnDemandInstancesLiveTest.java
b/providers/amazon/src/test/java/org/apache/provisionr/amazon/activities/RunOnDemandInstancesLiveTest.java
index 3ff545d..b0598b8 100644
--- a/providers/amazon/src/test/java/org/apache/provisionr/amazon/activities/RunOnDemandInstancesLiveTest.java
+++ b/providers/amazon/src/test/java/org/apache/provisionr/amazon/activities/RunOnDemandInstancesLiveTest.java
@@ -18,14 +18,6 @@
 
 package org.apache.provisionr.amazon.activities;
 
-import static org.fest.assertions.api.Assertions.assertThat;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
 import com.amazonaws.services.ec2.model.DescribeInstancesRequest;
 import com.amazonaws.services.ec2.model.DescribeInstancesResult;
 import com.amazonaws.services.ec2.model.DescribeVolumesRequest;
@@ -34,16 +26,21 @@ import com.amazonaws.services.ec2.model.Instance;
 import com.amazonaws.services.ec2.model.InstanceBlockDeviceMapping;
 import com.amazonaws.services.ec2.model.TerminateInstancesRequest;
 import com.amazonaws.services.ec2.model.Volume;
-import org.apache.provisionr.amazon.ProcessVariables;
-import org.apache.provisionr.api.hardware.BlockDevice;
-import org.apache.provisionr.test.ProcessVariablesCollector;
 import com.google.common.collect.Lists;
 import com.google.common.util.concurrent.Uninterruptibles;
-
 import java.util.List;
 import java.util.concurrent.TimeUnit;
-
+import org.apache.provisionr.amazon.ProcessVariables;
+import org.apache.provisionr.api.hardware.BlockDevice;
+import org.apache.provisionr.test.ProcessVariablesCollector;
+import static org.fest.assertions.api.Assertions.assertThat;
 import org.junit.Test;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 public class RunOnDemandInstancesLiveTest extends CreatePoolLiveTest<RunOnDemandInstances>
{
 
@@ -53,6 +50,7 @@ public class RunOnDemandInstancesLiveTest extends CreatePoolLiveTest<RunOnDemand
     @Override
     public void setUp() throws Exception {
         super.setUp();
+
         collector = new ProcessVariablesCollector();
         collector.install(execution);
     }
@@ -85,9 +83,11 @@ public class RunOnDemandInstancesLiveTest extends CreatePoolLiveTest<RunOnDemand
         BlockDevice blockDevice = mock(BlockDevice.class);
         when(blockDevice.getSize()).thenReturn(8); // TODO: understand why it doesn't work
for smaller volumes
         when(blockDevice.getName()).thenReturn("/dev/sda1");
+
         BlockDevice blockDevice2 = mock(BlockDevice.class);
         when(blockDevice2.getSize()).thenReturn(16);
         when(blockDevice2.getName()).thenReturn("/dev/sda4");
+
         when(hardware.getBlockDevices()).thenReturn(Lists.newArrayList(blockDevice, blockDevice2));
 
         activity.execute(execution);
@@ -102,19 +102,22 @@ public class RunOnDemandInstancesLiveTest extends CreatePoolLiveTest<RunOnDemand
         Instance instance = result.getReservations().get(0).getInstances().get(0);
         List<InstanceBlockDeviceMapping> bdm = instance.getBlockDeviceMappings();
         assertThat(bdm).hasSize(2);
+
         List<String> volumeIds = Lists.newArrayList();
         for (int i = 0; i < bdm.size(); i++) {
-            assertThat(bdm.get(i).getDeviceName()).isEqualTo("/dev/sda" + ((i+1) * (i+1)));
+            assertThat(bdm.get(i).getDeviceName()).isEqualTo("/dev/sda" + ((i + 1) * (i +
1)));
             assertThat(bdm.get(i).getEbs().getDeleteOnTermination()).isTrue();
+
             volumeIds.add(bdm.get(i).getEbs().getVolumeId());
         }
 
         DescribeVolumesResult volumesResult = client.describeVolumes(
-                new DescribeVolumesRequest().withVolumeIds(volumeIds));
+            new DescribeVolumesRequest().withVolumeIds(volumeIds));
         for (Volume volume : volumesResult.getVolumes()) {
             assertThat(volume.getState()).isIn(Lists.newArrayList("creating", "available",
"in-use"));
         }
-        assertThat(volumesResult.getVolumes().get(0).getSize()).isNotEqualTo(volumesResult.getVolumes().get(1).getSize());
+        assertThat(volumesResult.getVolumes().get(0).getSize())
+            .isNotEqualTo(volumesResult.getVolumes().get(1).getSize());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/9c9107ac/test-support/src/main/java/org/apache/provisionr/test/ProvisionrLiveTestSupport.java
----------------------------------------------------------------------
diff --git a/test-support/src/main/java/org/apache/provisionr/test/ProvisionrLiveTestSupport.java
b/test-support/src/main/java/org/apache/provisionr/test/ProvisionrLiveTestSupport.java
index 2104b98..a74b22b 100644
--- a/test-support/src/main/java/org/apache/provisionr/test/ProvisionrLiveTestSupport.java
+++ b/test-support/src/main/java/org/apache/provisionr/test/ProvisionrLiveTestSupport.java
@@ -18,8 +18,6 @@
 
 package org.apache.provisionr.test;
 
-import org.apache.provisionr.api.provider.Provider;
-import org.apache.provisionr.api.provider.ProviderBuilder;
 import com.google.common.base.Charsets;
 import com.google.common.base.Optional;
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -32,6 +30,8 @@ import javax.inject.Inject;
 import org.activiti.engine.ProcessEngine;
 import org.activiti.engine.repository.ProcessDefinition;
 import org.activiti.engine.runtime.ProcessInstance;
+import org.apache.provisionr.api.provider.Provider;
+import org.apache.provisionr.api.provider.ProviderBuilder;
 import org.osgi.framework.BundleContext;
 import org.osgi.util.tracker.ServiceTracker;
 import org.slf4j.Logger;
@@ -96,7 +96,7 @@ public class ProvisionrLiveTestSupport {
     }
 
     public String getResourceAsString(String resource) throws IOException {
-        return Resources.toString(Resources.getResource(resource), Charsets.UTF_8);
+        return Resources.toString(Resources.getResource(ProvisionrLiveTestSupport.class,
resource), Charsets.UTF_8);
     }
 
     /**
@@ -108,7 +108,7 @@ public class ProvisionrLiveTestSupport {
     public void waitForProcessDeployment(String processKey) throws InterruptedException,
TimeoutException {
         ProcessEngine engine = getOsgiService(ProcessEngine.class, 5000);
         int iteration = 0;
-        while (iteration < 5) {
+        while (iteration < 10) {
             ProcessDefinition definition = engine.getRepositoryService()
                 .createProcessDefinitionQuery()
                 .processDefinitionKey(processKey).singleResult();
@@ -116,7 +116,7 @@ public class ProvisionrLiveTestSupport {
                 break;
             }
             iteration++;
-            TimeUnit.MILLISECONDS.sleep(500);
+            TimeUnit.SECONDS.sleep(1);
         }
         if (iteration == 5) {
             throw new TimeoutException("No process found with key: " + processKey);


Mime
View raw message