次の k6 スクリプトは、1 つの vuser で正常に動作します。しかし、複数の仮想ユーザーで実行すると、スクリプトが失敗します:-
(←[33mWARN←[0m[0114] Request Failed ←[33merror←[0m="Post http://myurl.mycompany.com/v1/Order : net/http: request canceled (Client.Timeout over headers awaiting)) 」)。
以下のスクリプトを参照してください。どんな助けでも大歓迎です。
// Auto-generated by the Load Impact converter
import http from "k6/http";
import { check, group, sleep} from "k6";
export let options = {
vus: 2,
duration: "120s",
// maxRedirects: 4
}
export default function() {
let res;
res = http.post("http://myurl.mycompany.com.com/v1/Order",
"{ \"orderNumber\": \"\", \"webConfirmationId\": 12345, \"opptunityNum\": \"201707-861215\", \"accountNumber\": \"GNUF4240\", \"CustomerInstructions\": \"\", \"internalComments\": [ { \"text\": \"Client Contact: John D johnd@mycompany.com 2125555555 \" } ], \"OrderContact\": \"\", \"SalesForceContactId\": \"\", \"ancillaryItems\": [ { \"ancillaryItemTypeCode\": \"DISCOUNT\", \"description\": \"2% Web Discount\", \"unitPrice\": -4.99, \"quantity\": 1.0 } ], \"billToAddress\": {}, \"CampaignNumber\": \"ZXYCR\", \"ChargeLogicReferenceNumber\": \"\", \"createDate\": \"2017-07-26T20:19:54.587Z\", \"CON\": \"\", \"orderTypeCode\": \"4XD\" }",
{ headers: { "Authorization" : "bearer jahhHodoUVVTKqhsypd_tWbcsk", "Content-Type" : "application/json" } });
check(res, {
"is status 200":(r)=>r.status===200
});
sleep(3);
}