You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by al...@apache.org on 2021/05/24 14:21:55 UTC

[dubbo-samples] branch master updated: Improve nacos conditionrouter (#320)

This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-samples.git


The following commit(s) were added to refs/heads/master by this push:
     new 4f2f960  Improve nacos conditionrouter (#320)
4f2f960 is described below

commit 4f2f96089cb92bde4730135f39c897f353c93aea
Author: Gong Dewei <ky...@qq.com>
AuthorDate: Mon May 24 22:20:12 2021 +0800

    Improve nacos conditionrouter (#320)
---
 .../case-configuration.yml                                    |  7 +++++++
 .../src/test/resources/dubbo.properties                       |  1 +
 test/dubbo-scenario-builder/src/main/resources/scenario.sh    | 11 ++++++++++-
 3 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/dubbo-samples-nacos/dubbo-samples-nacos-conditionrouter/case-configuration.yml b/dubbo-samples-nacos/dubbo-samples-nacos-conditionrouter/case-configuration.yml
index c336daf..c2d1f91 100644
--- a/dubbo-samples-nacos/dubbo-samples-nacos-conditionrouter/case-configuration.yml
+++ b/dubbo-samples-nacos/dubbo-samples-nacos-conditionrouter/case-configuration.yml
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+timeout: 200
+
 services:
   nacos:
     image: nacos/nacos-server:2.0.0
@@ -23,6 +25,11 @@ services:
       - JVM_XMS=350m
       - JVM_XMX=350m
       - JVM_XMN=150m
+    healthcheck:
+      test: 'curl -Ss http://localhost:8848/nacos'
+      interval: 5s
+      timeout: 5s
+      retries: 40
 
   dubbo-samples-nacos-conditionrouter1:
     type: app
diff --git a/dubbo-samples-nacos/dubbo-samples-nacos-override/src/test/resources/dubbo.properties b/dubbo-samples-nacos/dubbo-samples-nacos-override/src/test/resources/dubbo.properties
new file mode 100644
index 0000000..6b4019d
--- /dev/null
+++ b/dubbo-samples-nacos/dubbo-samples-nacos-override/src/test/resources/dubbo.properties
@@ -0,0 +1 @@
+dubbo.application.enable-file-cache=false
\ No newline at end of file
diff --git a/test/dubbo-scenario-builder/src/main/resources/scenario.sh b/test/dubbo-scenario-builder/src/main/resources/scenario.sh
index 1b89848..e39f310 100644
--- a/test/dubbo-scenario-builder/src/main/resources/scenario.sh
+++ b/test/dubbo-scenario-builder/src/main/resources/scenario.sh
@@ -132,7 +132,6 @@ function wait_container_exit() {
 }
 
 status=1
-start=$SECONDS
 
 mkdir -p ${SCENARIO_HOME}/logs
 scenario_log=${SCENARIO_HOME}/logs/scenario.log
@@ -151,9 +150,19 @@ docker-compose -p ${project_name} -f ${compose_file} kill 2>&1 | tee -a $scenari
 echo "[$scenario_name] Removing containers .." | tee -a $scenario_log
 docker-compose -p ${project_name} -f ${compose_file} rm -f 2>&1 | tee -a $scenario_log > /dev/null
 
+# pull images
+# TODO check pull timeout?
+#pull_time=$SECONDS
+#echo "[$scenario_name] Pulling images .." | tee -a $scenario_log
+#docker-compose -p ${project_name} -f ${compose_file} pull --ignore-pull-failures 2>&1 <<< "NNN" | tee -a $scenario_log > /dev/null
+#echo "Pull images cost: $((SECONDS - pull_time)) s"
+
 #run async, cause depends_on service healthy blocking docker-compose up
 redirect_all_container_logs &
 
+# start time
+start=$SECONDS
+
 # complete pull fail interactive by <<< "NN"
 echo "[$scenario_name] Starting containers .." | tee -a $scenario_log
 docker-compose -p ${project_name} -f ${compose_file} up -d 2>&1 <<< "NNN" | tee -a $scenario_log > /dev/null

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org