fix: pass self-reference in VendorTenantServiceTest for async proxy
All checks were successful
CI / build (push) Successful in 1m17s
CI / docker (push) Successful in 44s

The @Lazy self-proxy pattern requires a non-null reference in tests.
Construct the instance then re-create with itself as the self param.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-15 23:33:07 +02:00
parent 97b2235914
commit 3c2bf4a9b1

View File

@@ -79,10 +79,16 @@ class VendorTenantServiceTest {
"jdbc:postgresql://pg:5432/db", "cameleer", "cameleer_dev",
"jdbc:clickhouse://ch:8123/cameleer", "default", "cameleer_ch",
"https://localhost/oidc", "http://cameleer-logto:3001/oidc/jwks", "https://localhost");
// Pass null for self-proxy initially, then re-create with the instance itself
// (in production, Spring's @Lazy proxy handles this circular ref)
vendorTenantService = new VendorTenantService(
tenantService, tenantRepository, licenseService,
tenantProvisioner, serverApiClient, logtoClient, logtoConfig,
auditService, provisioningProps, dataCleanupService, tenantDatabaseService, null);
vendorTenantService = new VendorTenantService(
tenantService, tenantRepository, licenseService,
tenantProvisioner, serverApiClient, logtoClient, logtoConfig,
auditService, provisioningProps, dataCleanupService, tenantDatabaseService, vendorTenantService);
}
// --- Helpers ---