test(document): add query-count assertions for findAll + findById entity graphs
Adds Hibernate statistics to the test config and two new tests in DocumentRepositoryTest: - findAll_withSpecAndPageable asserts ≤5 statements for 10 documents (currently RED: EAGER @ManyToMany generates 31 secondary SELECTs) - findById regression guard verifies collections load in ≤2 statements Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,10 @@ spring:
|
||||
password: test
|
||||
mail:
|
||||
host: localhost
|
||||
jpa:
|
||||
properties:
|
||||
hibernate:
|
||||
generate_statistics: true
|
||||
|
||||
# Disable OTel SDK entirely in tests — prevents auto-configuration from loading resource providers
|
||||
# (e.g. AzureAppServiceResourceProvider) that fail against the semconv version used here.
|
||||
|
||||
Reference in New Issue
Block a user