Skip to content

Commit

Permalink
FAB-5719 Aviod CC update on none supported vers
Browse files Browse the repository at this point in the history
PS 9  Wait for services started mostly when we pull from docker hub

Change-Id: I330c59fd0dd5480e495247cb1e30ef37f12f4b8a
Signed-off-by: rickr <cr22rc@gmail.com>
  • Loading branch information
cr22rc committed Aug 18, 2017
1 parent 7011ca4 commit 629d9a9
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 4 deletions.
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<alpn-boot-version>8.1.7.v20160121</alpn-boot-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.version>0.7.9</jacoco.version>
<org.hyperledger.fabric.sdktest.ITSuite>IntegrationSuite.java</org.hyperledger.fabric.sdktest.ITSuite>
</properties>

<reporting>
Expand Down Expand Up @@ -230,7 +231,7 @@
<configuration>
<argLine>${failsafeArgLine}</argLine>
<includes>
<include>**/IntegrationSuite.java</include>
<include>**/${org.hyperledger.fabric.sdktest.ITSuite}</include>
</includes>
<skipITs>${skipITs}</skipITs>
<!--<argLine>-->
Expand Down
25 changes: 23 additions & 2 deletions src/test/cirun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,34 @@ export ORG_HYPERLEDGER_FABRIC_SDK_LOGLEVEL=TRACE
export ORG_HYPERLEDGER_FABRIC_CA_SDK_LOGLEVEL=TRACE
export ORG_HYPERLEDGER_FABRIC_SDK_LOG_EXTRALOGLEVEL=10

ORG_HYPERLEDGER_FABRIC_SDKTEST_VERSION=${ORG_HYPERLEDGER_FABRIC_SDKTEST_VERSION:-}

if [ "$ORG_HYPERLEDGER_FABRIC_SDKTEST_VERSION" == "1.0.0" ]; then
export ORG_HYPERLEDGER_FABRIC_SDKTEST_ITSUITE="-Dorg.hyperledger.fabric.sdktest.ITSuite=IntegrationSuiteV1.java"
else
export ORG_HYPERLEDGER_FABRIC_SDKTEST_ITSUITE=""
fi

cd $WD/src/test/fixture/sdkintegration
./fabric.sh restart >dockerlogfile.log 2>&1 &
sleep 5; #give it this much to start.

cd $WD
sleep 30

i=0

#wait till we get at least one peer started other should not be far behind.
until [ "`docker inspect -f {{.State.Running}} peer1.org2.example.com`" == "true" ] || [ $i -gt 60 ]; do
i=$((i + 1))
echo "Waiting.. $i"
sleep 10;
done;

sleep 15 # some more time just for the other services .. this should be overkill.

docker images
docker ps -a
export ORG_HYPERLEDGER_FABRIC_SDK_DIAGNOSTICFILEDIR=target/diagDump
mvn clean install -DskipITs=false -Dmaven.test.failure.ignore=false javadoc:javadoc
mvn clean install -DskipITs=false -Dmaven.test.failure.ignore=false javadoc:javadoc ${ORG_HYPERLEDGER_FABRIC_SDKTEST_ITSUITE}
docker images
docker ps -a
9 changes: 8 additions & 1 deletion src/test/fixture/sdkintegration/fabric.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ if [ ! -e "docker-compose.yaml" ];then
exit 8
fi

ORG_HYPERLEDGER_FABRIC_SDKTEST_VERSION=${ORG_HYPERLEDGER_FABRIC_SDKTEST_VERSION:-}

function clean(){

Expand All @@ -34,7 +35,13 @@ function clean(){
}

function up(){
docker-compose up --force-recreate

if [ "$ORG_HYPERLEDGER_FABRIC_SDKTEST_VERSION" == "1.0.0" ]; then
docker-compose up --force-recreate ca0 ca1 peer1.org1.example.com peer1.org2.example.com ccenv
else
docker-compose up --force-recreate
fi

}

function down(){
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
*
* Copyright 2016,2017 DTCC, Fujitsu Australia Software Technology, IBM - All Rights Reserved.
*
* Licensed 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.
*
*/
package org.hyperledger.fabric.sdkintegration;

import org.hyperledger.fabric_ca.sdkintegration.HFCAClientIT;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;

@RunWith (Suite.class)

@Suite.SuiteClasses (
{
End2endIT.class,
End2endAndBackAgainIT.class,
HFCAClientIT.class
})
public class IntegrationSuiteV1 {

}

0 comments on commit 629d9a9

Please sign in to comment.