fix: pass self-reference in VendorTenantServiceTest for async proxy
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:
@@ -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 ---
|
||||
|
||||
Reference in New Issue
Block a user