stanley-king 3 năm trước cách đây
mục cha
commit
a27720670e
2 tập tin đã thay đổi với 5 bổ sung5 xóa
  1. 2 2
      helper/refill/util.php
  2. 3 3
      test/TestRefillThird.php

+ 2 - 2
helper/refill/util.php

@@ -656,7 +656,7 @@ class util
         }
         $url = BASE_SITE_URL . "/mobile/callback/refill_baidu.php";
         go(function () use ($url, $status,$order_sn) {
-            sleep(1);
+            sleep(3);
             while (true)
             {
                 $resp = http_request($url,['status' => $status,'order_sn' => $order_sn],'GET', false, [], $net_errno);
@@ -680,7 +680,7 @@ class util
 
         $url = BASE_SITE_URL . "/mobile/callback/refill_baidu.php";
         go(function () use ($url, $status,$order_sn) {
-            sleep(1);
+            sleep(3);
             while (true)
             {
                 $resp = http_request($url,['status' => $status,'order_sn' => $order_sn],'GET', false, [], $net_errno);

+ 3 - 3
test/TestRefillThird.php

@@ -122,7 +122,7 @@ class TestRefillThird extends TestCase
         $sender = function ()
         {
             $time = time();
-            for ($i = 0; $i < 1000; $i++)
+            for ($i = 0; $i < 100; $i++)
             {
                 $params = [ 'mchid' => 1092,
                     'buyer_id' => 60221,
@@ -141,9 +141,9 @@ class TestRefillThird extends TestCase
             }
         };
 
-        for ($i = 0;$i < 10; $i++) {
+        for ($i = 0;$i < 100; $i++) {
             $sender();
-            sleep(1);
+            sleep(2);
         }
 
         //docker-compose run phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillThird::testSlowPushPhones)( .*)?$/" --test-suffix TestRefillThird.php /var/www/html/test