Class AbstractMultiTenantServerTest

java.lang.Object
org.a2aproject.sdk.extras.multitenancy.tests.AbstractMultiTenantServerTest

public abstract class AbstractMultiTenantServerTest extends Object
Transport-agnostic multitenancy server test driven through the real A2A Client. Concrete @QuarkusTest subclasses implement the three transport hooks and each carry exactly one transport's reference module on the classpath.
  • Field Details

    • TEST_PORT

      protected static final int TEST_PORT
      Port every subclass's Quarkus test server and client URL/target must agree on.
      See Also:
    • serverPort

      protected final int serverPort
  • Constructor Details

    • AbstractMultiTenantServerTest

      protected AbstractMultiTenantServerTest(int serverPort)
  • Method Details

    • getTransportProtocol

      protected abstract String getTransportProtocol()
      e.g. "JSONRPC", "GRPC", "HTTP+JSON".
    • getTransportUrl

      protected abstract String getTransportUrl()
      Base URL/target the client uses to reach the server. Must encode the same port passed to this class's constructor (e.g. "http://localhost:" + TEST_PORT, or "localhost:" + TEST_PORT for gRPC's schemeless target) — the two are not derived from each other.
    • configureTransport

      protected abstract void configureTransport(ClientBuilder builder)
      Wire the transport-specific Client (channel/http-client factory).
    • knownTenantRoutesToAcmeExecutor

      @Test public void knownTenantRoutesToAcmeExecutor() throws Exception
      Throws:
      Exception
    • secondTenantRoutesToBetaExecutor

      @Test public void secondTenantRoutesToBetaExecutor() throws Exception
      Throws:
      Exception
    • unknownTenantFallsBackToDefault

      @Test public void unknownTenantFallsBackToDefault() throws Exception
      Throws:
      Exception
    • nullTenantUsesDefault

      @Test public void nullTenantUsesDefault() throws Exception
      Throws:
      Exception
    • streamingWithKnownTenant

      @Test public void streamingWithKnownTenant() throws Exception
      Throws:
      Exception
    • streamingWithUnknownTenantUsesDefault

      @Test public void streamingWithUnknownTenantUsesDefault() throws Exception
      Throws:
      Exception
    • concurrentRequestsForDifferentTenants

      @Test public void concurrentRequestsForDifferentTenants() throws Exception
      Throws:
      Exception
    • extendedCardKnownTenantResolvesToAcme

      @Test public void extendedCardKnownTenantResolvesToAcme() throws Exception
      Throws:
      Exception
    • extendedCardSecondTenantResolvesToBeta

      @Test public void extendedCardSecondTenantResolvesToBeta() throws Exception
      Throws:
      Exception
    • extendedCardUnknownTenantFallsBackToDefault

      @Test public void extendedCardUnknownTenantFallsBackToDefault() throws Exception
      Throws:
      Exception
    • extendedCardNullTenantUsesDefault

      @Test public void extendedCardNullTenantUsesDefault() throws Exception
      Throws:
      Exception
    • publicCardWithoutTenantReturnsDefault

      @Test public void publicCardWithoutTenantReturnsDefault()
    • publicCardWithAcmeTenant

      @Test public void publicCardWithAcmeTenant()
    • publicCardWithBetaTenant

      @Test public void publicCardWithBetaTenant()
    • publicCardUnknownTenantReturns404

      @Test public void publicCardUnknownTenantReturns404()
    • closeClients

      @AfterEach public void closeClients()
    • getStreamingClient

      protected Client getStreamingClient()
    • getNonStreamingClient

      protected Client getNonStreamingClient()