mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-07-02 08:27:41 +08:00
12c25a2d21
* feat: add concurrency support to ProcessSupervisor - Replace the single-slot mutex channel with a configurable semaphore to allow multiple concurrent tasks. - Add drain logic to ensure all active tasks complete before process restarts. * feat: add chromium-max-concurrency flag - Add a --chromium-max-concurrency flag (1-6) to the Chromium module to control how many conversions run in parallel. - Update LibreOffice to pass maxConcurrency=1 as LibreOffice only supports a single concurrent conversion. * test: add integration tests for concurrent Chromium conversions - Add concurrent request support to the integration test framework with new step definitions for sending parallel requests and asserting on all responses. - Add a feature file for concurrent HTML to PDF conversions.
21 lines
1.1 KiB
Gherkin
21 lines
1.1 KiB
Gherkin
@chromium
|
|
@chromium-concurrent
|
|
Feature: Chromium concurrent conversions
|
|
|
|
Scenario: Concurrent HTML to PDF conversions with max concurrency 3
|
|
Given I have a Gotenberg container with the following environment variable(s):
|
|
| CHROMIUM_MAX_CONCURRENCY | 3 |
|
|
When I make 3 concurrent "POST" requests to Gotenberg at the "/forms/chromium/convert/html" endpoint with the following form data and header(s):
|
|
| files | testdata/page-1-html/index.html | file |
|
|
Then all concurrent response status codes should be 200
|
|
Then all concurrent responses should have 1 PDF(s)
|
|
|
|
Scenario: Concurrent conversions exceeding restart-after limit
|
|
Given I have a Gotenberg container with the following environment variable(s):
|
|
| CHROMIUM_MAX_CONCURRENCY | 3 |
|
|
| CHROMIUM_RESTART_AFTER | 5 |
|
|
When I make 10 concurrent "POST" requests to Gotenberg at the "/forms/chromium/convert/html" endpoint with the following form data and header(s):
|
|
| files | testdata/page-1-html/index.html | file |
|
|
Then all concurrent response status codes should be 200
|
|
Then all concurrent responses should have 1 PDF(s)
|