stanley-king %!s(int64=4) %!d(string=hai) anos
pai
achega
9a8764b53d

+ 1 - 1
helper/refill/RefillFactory.php

@@ -36,7 +36,7 @@ class RefillFactory
             self::$stInstance = new RefillFactory();
         }
 
-        if(defined('MOBILE_SERVER') && MOBILE_SERVER === true)
+        if(defined('SUPPORT_PTHREAD') && SUPPORT_PTHREAD === true)
         {
             Log::record("MOBILE_SERVER defined call load",Log::DEBUG);
             if(StatesHelper::fetch_state('channel')) {

+ 2 - 0
mobile/mobile_run.php

@@ -2,6 +2,8 @@
 
 define('APP_ID', 'mobile');
 define('MOBILE_SERVER',true);
+define('SUPPORT_PTHREAD',true);
+
 define('BASE_ROOT_PATH', str_replace('/mobile', '', dirname(__FILE__)));
 define('BASE_PATH', BASE_ROOT_PATH . '/mobile');
 

+ 1 - 0
rdispatcher/dispatcher.php

@@ -3,6 +3,7 @@ declare(strict_types=0);
 
 define('APP_ID', 'rdispatcher');
 define('MOBILE_SERVER',true);
+define('SUPPORT_PTHREAD',false);
 
 define('BASE_ROOT_PATH',str_replace('/rdispatcher','',dirname(__FILE__)));
 define('BASE_PATH',BASE_ROOT_PATH . '/rdispatcher');

+ 13 - 2
test/TestAccRefill.php

@@ -284,6 +284,16 @@ class TestAccRefill extends TestCase
     public function testAddoil()
     {
         $url = $this->mReqHost . "/racc/index.php";
+        for ($i = 0; $i < 10000; $i++)
+        {
+            $params = $this->make_order();
+            $resp = $this->send_md5($url, $params);
+            Log::record($resp, Log::DEBUG);
+        }
+    }
+
+    private function make_order()
+    {
         $notifyurl = 'https://www.xyzshops.cn/mobile/signature.php';
         $params = ['mchid' => $this->mMchid,
             'cardno' => '1000111100020445281',
@@ -293,8 +303,9 @@ class TestAccRefill extends TestCase
             'order_sn' => $this->make_sn(),
             'notifyurl' => $notifyurl];
 
-        $resp = $this->send_md5($url, $params);
-        Log::record($resp, Log::DEBUG);
+        return $params;
+
+
     }
 
     public function testBalance()