Class AccountManager
java.lang.Object
ai.pipestream.module.pipelineprobe.pipelinecrawl.AccountManager
Resolves the test account for a
RunPipelineCrawl run. Returns
the resolved account_id directly — no futures, no observers,
no helper wrappers. The injected AccountServiceGrpc.AccountServiceBlockingStub
blocks the calling (virtual) thread until the response lands; on a VT
that's a cheap park, on a platform thread it's a wasted thread, so
callers must run on a virtual thread.
Wiring lives in application.properties:
quarkus.grpc.clients.account-manager.* + quarkus.stork."account-manager".*.
Quarkus's @GrpcClient annotation injects the stub; Stork resolves
account-manager via Consul. No DynamicGrpcClientFactory,
no per-call channel construction — this is the standard Quarkus pattern.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetOrCreate(String accountId, String name) Idempotently create (or reuse) an account with a CALLER-CHOSEN id — used by tests that need a STABLE account across runs (e.g.resolveAccount(String requestedAccountId, String fallbackName) Resolve the test account: use the caller's preferred id if set, otherwise mint one and create it.
-
Constructor Details
-
AccountManager
public AccountManager()Creates the account manager. Managed by CDI.
-
-
Method Details
-
resolveAccount
Resolve the test account: use the caller's preferred id if set, otherwise mint one and create it. Idempotent — if the account already exists the gRPC call returnscreated=falseand we still return the same id.- Parameters:
requestedAccountId- the caller-supplied account id; when non-null and non-empty it is reused as-isfallbackName- the account name used when a new account is minted because no id was supplied- Returns:
- the resolved account id (the supplied one, or a newly minted one)
-
getOrCreate
Idempotently create (or reuse) an account with a CALLER-CHOSEN id — used by tests that need a STABLE account across runs (e.g. the engine-perf harness'sengineperf-<module>). The create call is idempotent on the platform side (created=falseon reuse); both drives (<id>:intake+<id>:pipeline) are provisioned at creation.- Parameters:
accountId- the caller-chosen, stable account id to create or reusename- the account name set on the create request- Returns:
- the same
accountIdthat was created or reused
-