You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2020/11/18 04:30:49 UTC

[shardingsphere-elasticjob] branch master updated: Adjust delay for HttpJobExecutorTest (#1722)

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

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elasticjob.git


The following commit(s) were added to refs/heads/master by this push:
     new 40a6ced  Adjust delay for HttpJobExecutorTest (#1722)
40a6ced is described below

commit 40a6ced7a18d1a7d3b8ed12461c54f2b021ad98b
Author: 吴伟杰 <ro...@me.com>
AuthorDate: Wed Nov 18 12:30:36 2020 +0800

    Adjust delay for HttpJobExecutorTest (#1722)
---
 .../elasticjob/http/executor/fixture/InternalController.java      | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/elasticjob-ecosystem/elasticjob-executor/elasticjob-executor-type/elasticjob-http-executor/src/test/java/org/apache/shardingsphere/elasticjob/http/executor/fixture/InternalController.java b/elasticjob-ecosystem/elasticjob-executor/elasticjob-executor-type/elasticjob-http-executor/src/test/java/org/apache/shardingsphere/elasticjob/http/executor/fixture/InternalController.java
index 6c58132..6a289e8 100644
--- a/elasticjob-ecosystem/elasticjob-executor/elasticjob-executor-type/elasticjob-http-executor/src/test/java/org/apache/shardingsphere/elasticjob/http/executor/fixture/InternalController.java
+++ b/elasticjob-ecosystem/elasticjob-executor/elasticjob-executor-type/elasticjob-http-executor/src/test/java/org/apache/shardingsphere/elasticjob/http/executor/fixture/InternalController.java
@@ -18,6 +18,7 @@
 package org.apache.shardingsphere.elasticjob.http.executor.fixture;
 
 import lombok.extern.slf4j.Slf4j;
+import org.apache.shardingsphere.elasticjob.infra.concurrent.BlockUtils;
 import org.apache.shardingsphere.elasticjob.restful.Http;
 import org.apache.shardingsphere.elasticjob.restful.RestfulController;
 import org.apache.shardingsphere.elasticjob.restful.annotation.Mapping;
@@ -64,16 +65,13 @@ public final class InternalController implements RestfulController {
     }
     
     /**
-     * Post with 3 mills delay for request IO Exception.
+     * Post with 100 mills delay for request IO Exception.
      *
      * @return "ejob"
      */
     @Mapping(method = Http.POST, path = "/postWithTimeout")
     public String postWithTimeout() {
-        try {
-            Thread.sleep(3);
-        } catch (InterruptedException ignore) {
-        }
+        BlockUtils.waitingShortTime();
         return "ejob";
     }
 }