{
  "name": "Число повторов: maxRetries клиента и вызова; пауза растёт до 8 с",
  "description": "Клиент с maxRetries = 3: четыре попытки, паузы 500, 1000, 2000. Вызов с maxRetries = 6: семь попыток, паузы 500, 1000, 2000, 4000, 8000, 8000 (предел 8 с). Вызов с maxRetries = 0: одна попытка. Источник случайности исполнителя возвращает верхнюю границу.",
  "client": {
    "api": "runtime",
    "credential": {"terminalKey": "lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw"},
    "baseUrl": "https://api.example.com",
    "maxRetries": 3
  },
  "calls": [
    {
      "operation": "getReceipt",
      "args": {"receipt": "01929c1e-0050-7050-8050-000000000050"},
      "expect": {"error": {"class": "server", "status": 502, "code": null}}
    },
    {
      "operation": "getReceipt",
      "args": {"receipt": "01929c1e-0050-7050-8050-000000000050"},
      "options": {"maxRetries": 6},
      "expect": {"error": {"class": "server", "status": 503, "code": null}}
    },
    {
      "operation": "getReceipt",
      "args": {"receipt": "01929c1e-0050-7050-8050-000000000050"},
      "options": {"maxRetries": 0},
      "expect": {"error": {"class": "server", "status": 502, "code": null}}
    }
  ],
  "exchanges": [
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/v1/receipts/01929c1e-0050-7050-8050-000000000050",
        "headers": {
          "authorization": "Bearer lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null
        }
      },
      "response": {
        "status": 502,
        "headers": {"Content-Type": "text/html"},
        "text": "<html><head><title>502 Bad Gateway</title></head><body><h1>502 Bad Gateway</h1></body></html>"
      }
    },
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/v1/receipts/01929c1e-0050-7050-8050-000000000050",
        "headers": {
          "authorization": "Bearer lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null
        }
      },
      "response": {
        "status": 502,
        "headers": {"Content-Type": "text/html"},
        "text": "<html><head><title>502 Bad Gateway</title></head><body><h1>502 Bad Gateway</h1></body></html>"
      }
    },
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/v1/receipts/01929c1e-0050-7050-8050-000000000050",
        "headers": {
          "authorization": "Bearer lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null
        }
      },
      "response": {
        "status": 502,
        "headers": {"Content-Type": "text/html"},
        "text": "<html><head><title>502 Bad Gateway</title></head><body><h1>502 Bad Gateway</h1></body></html>"
      }
    },
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/v1/receipts/01929c1e-0050-7050-8050-000000000050",
        "headers": {
          "authorization": "Bearer lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null
        }
      },
      "response": {
        "status": 502,
        "headers": {"Content-Type": "text/html"},
        "text": "<html><head><title>502 Bad Gateway</title></head><body><h1>502 Bad Gateway</h1></body></html>"
      }
    },
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/v1/receipts/01929c1e-0050-7050-8050-000000000050",
        "headers": {
          "authorization": "Bearer lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null
        }
      },
      "response": {"status": 503, "headers": {"Content-Type": "text/plain"}, "text": "Service Unavailable"}
    },
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/v1/receipts/01929c1e-0050-7050-8050-000000000050",
        "headers": {
          "authorization": "Bearer lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null
        }
      },
      "response": {"status": 503, "headers": {"Content-Type": "text/plain"}, "text": "Service Unavailable"}
    },
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/v1/receipts/01929c1e-0050-7050-8050-000000000050",
        "headers": {
          "authorization": "Bearer lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null
        }
      },
      "response": {"status": 503, "headers": {"Content-Type": "text/plain"}, "text": "Service Unavailable"}
    },
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/v1/receipts/01929c1e-0050-7050-8050-000000000050",
        "headers": {
          "authorization": "Bearer lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null
        }
      },
      "response": {"status": 503, "headers": {"Content-Type": "text/plain"}, "text": "Service Unavailable"}
    },
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/v1/receipts/01929c1e-0050-7050-8050-000000000050",
        "headers": {
          "authorization": "Bearer lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null
        }
      },
      "response": {"status": 503, "headers": {"Content-Type": "text/plain"}, "text": "Service Unavailable"}
    },
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/v1/receipts/01929c1e-0050-7050-8050-000000000050",
        "headers": {
          "authorization": "Bearer lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null
        }
      },
      "response": {"status": 503, "headers": {"Content-Type": "text/plain"}, "text": "Service Unavailable"}
    },
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/v1/receipts/01929c1e-0050-7050-8050-000000000050",
        "headers": {
          "authorization": "Bearer lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null
        }
      },
      "response": {"status": 503, "headers": {"Content-Type": "text/plain"}, "text": "Service Unavailable"}
    },
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/v1/receipts/01929c1e-0050-7050-8050-000000000050",
        "headers": {
          "authorization": "Bearer lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null
        }
      },
      "response": {
        "status": 502,
        "headers": {"Content-Type": "text/html"},
        "text": "<html><head><title>502 Bad Gateway</title></head><body><h1>502 Bad Gateway</h1></body></html>"
      }
    }
  ],
  "sleeps": [500, 1000, 2000, 500, 1000, 2000, 4000, 8000, 8000]
}
