feat(docker): update base images to Java 25, Spring 4, Jackson 3, Gradle 9 and optimize JVM options (Project Lilliput) (#5725)

Co-authored-by: Anthony Stirling <[email protected]>
This commit is contained in:
Balázs Szücs
2026-02-24 20:06:32 +00:00
committed by GitHub
co-authored by Anthony Stirling
parent 24128dd318
commit 1f9b90ad57
112 changed files with 3181 additions and 2102 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ Feature: API Validation
| deskew | true |
| clean | true |
| cleanFinal | true |
| ocrType | Force |
| ocrType | force-ocr |
| ocrRenderType | hocr |
| removeImagesAfter | false |
When I send the API request to the endpoint "/api/v1/misc/ocr-pdf"
+33 -8
View File
@@ -136,8 +136,10 @@ Feature: Filter API Endpoints
# ---------------------------------------------------------------------------
# filter-page-size
# Blank pages are 72x72 points (smaller than any standard page size).
# Pages with random text use LETTER (612x792 points).
# Blank pages use LETTER (612x792 points = 484704 sq pts), same as pages
# with random text. Standard page areas for reference:
# A0 ~8031893 sq pts, A4 ~501168 sq pts, LEGAL 616896 sq pts,
# LETTER 484704 sq pts, A6 ~124870 sq pts
# ---------------------------------------------------------------------------
@filter-page-size @positive
@@ -157,10 +159,21 @@ Feature: Filter API Endpoints
| standardPageSize |
| A0 |
| A4 |
| A6 |
| LETTER |
| LEGAL |
@filter-page-size @positive
Scenario: filter-page-size returns 200 when blank PDF equals LETTER size
Given I generate a PDF file as "fileInput"
And the pdf contains 2 pages
And the request data includes
| parameter | value |
| standardPageSize | LETTER |
| comparator | Equal |
When I send the API request to the endpoint "/api/v1/filter/filter-page-size"
Then the response status code should be 200
And the response content type should be "application/pdf"
And the response file should have size greater than 0
@filter-page-size @positive
Scenario: filter-page-size returns 200 when text PDF equals LETTER size
Given I generate a PDF file as "fileInput"
@@ -174,6 +187,19 @@ Feature: Filter API Endpoints
And the response content type should be "application/pdf"
And the response file should have size greater than 0
@filter-page-size @positive
Scenario: filter-page-size returns 200 when blank PDF is Greater than A6
Given I generate a PDF file as "fileInput"
And the pdf contains 2 pages
And the request data includes
| parameter | value |
| standardPageSize | A6 |
| comparator | Greater |
When I send the API request to the endpoint "/api/v1/filter/filter-page-size"
Then the response status code should be 200
And the response content type should be "application/pdf"
And the response file should have size greater than 0
@filter-page-size @negative
Scenario Outline: filter-page-size returns 204 when blank PDF does not match standard size as Equal
Given I generate a PDF file as "fileInput"
@@ -188,16 +214,15 @@ Feature: Filter API Endpoints
Examples:
| standardPageSize |
| A4 |
| LETTER |
| LEGAL |
@filter-page-size @negative
Scenario: filter-page-size returns 204 when blank PDF is not Greater than any standard size
Scenario: filter-page-size returns 204 when blank PDF is not Greater than A4
Given I generate a PDF file as "fileInput"
And the pdf contains 2 pages
And the request data includes
| parameter | value |
| standardPageSize | A6 |
| parameter | value |
| standardPageSize | A4 |
| comparator | Greater |
When I send the API request to the endpoint "/api/v1/filter/filter-page-size"
Then the response status code should be 204
@@ -26,10 +26,18 @@ API_HEADERS = {"X-API-KEY": "123456789"}
def step_generate_pdf(context, fileInput):
context.param_name = fileInput
context.file_name = "genericNonCustomisableName.pdf"
writer = PdfWriter()
writer.add_blank_page(width=72, height=72) # Single blank page
# Generate a PDF with proper size and content (Letter size: 612x792 points)
buffer = io.BytesIO()
c = canvas.Canvas(buffer, pagesize=letter)
width, height = letter
# Add some text content so OCR and other tools can process it
c.drawString(100, height - 100, "This is a test PDF document")
c.showPage()
c.save()
with open(context.file_name, "wb") as f:
writer.write(f)
f.write(buffer.getvalue())
if not hasattr(context, "files"):
context.files = {}
context.files[context.param_name] = open(context.file_name, "rb")
@@ -52,11 +60,16 @@ def step_use_example_file(context, filePath, fileInput):
@given("the pdf contains {page_count:d} pages")
def step_pdf_contains_pages(context, page_count):
writer = PdfWriter()
buffer = io.BytesIO()
c = canvas.Canvas(buffer, pagesize=letter)
width, height = letter
for i in range(page_count):
writer.add_blank_page(width=72, height=72)
c.drawString(100, height - 100, f"Page {i + 1} of {page_count}")
c.showPage()
c.save()
with open(context.file_name, "wb") as f:
writer.write(f)
f.write(buffer.getvalue())
context.files[context.param_name].close()
context.files[context.param_name] = open(context.file_name, "rb")
@@ -64,11 +77,15 @@ def step_pdf_contains_pages(context, page_count):
# Duplicate for now...
@given("the pdf contains {page_count:d} blank pages")
def step_pdf_contains_blank_pages(context, page_count):
writer = PdfWriter()
buffer = io.BytesIO()
c = canvas.Canvas(buffer, pagesize=letter)
width, height = letter
for i in range(page_count):
writer.add_blank_page(width=72, height=72)
c.showPage()
c.save()
with open(context.file_name, "wb") as f:
writer.write(f)
f.write(buffer.getvalue())
context.files[context.param_name].close()
context.files[context.param_name] = open(context.file_name, "rb")