@@ -65,8 +65,15 @@ type TestServerInterface interface {
65
65
66
66
// ApplicationLayerInterface is implemented by TestServerInterface
67
67
// for backward-compatibility with existing test code.
68
- // New code should spell out their intent clearly by calling
69
- // the .ApplicationLayer() or .SystemLayer() methods directly.
68
+ //
69
+ // It is CURRENTLY equivalent to .SystemLayer() however this is
70
+ // a misdesign and results in poor test semantics.
71
+ //
72
+ // See: https://go.crdb.dev/p/testserver-api-problem
73
+ //
74
+ // New tests should spell out their intent clearly by calling the
75
+ // .ApplicationLayer() (preferred) or .SystemLayer() methods
76
+ // directly.
70
77
ApplicationLayerInterface
71
78
72
79
// TenantControlInterface is implemented by TestServerInterface
@@ -78,7 +85,7 @@ type TestServerInterface interface {
78
85
// ApplicationLayer returns the interface to the application layer that is
79
86
// exercised by the test. Depending on how the test server is started
80
87
// and (optionally) randomization, this can be either the SQL layer
81
- // of a secondary tenant or that of the system tenant .
88
+ // of a virtual cluster or that of the system interface .
82
89
ApplicationLayer () ApplicationLayerInterface
83
90
84
91
// SystemLayer returns the interface to the application layer
@@ -137,8 +144,7 @@ type TestServerController interface {
137
144
138
145
// ApplicationLayerInterface defines accessors to the application
139
146
// layer of a test server. Tests written against this interface are
140
- // effectively agnostic to whether they use a secondary tenant or not.
141
- // This interface is implemented by server.Test{Tenant,Server}.
147
+ // effectively agnostic to whether they use a virtual cluster or not.
142
148
type ApplicationLayerInterface interface {
143
149
// Readiness returns true when the server is ready, that is,
144
150
// when it is accepting connections and it is not draining.
@@ -458,7 +464,7 @@ type ApplicationLayerInterface interface {
458
464
// start the SQL and HTTP service for secondary tenants (virtual
459
465
// clusters).
460
466
type TenantControlInterface interface {
461
- // StartSharedProcessTenant starts the service for a secondary tenant
467
+ // StartSharedProcessTenant starts the service for a virtual cluster
462
468
// using the special configuration we define for shared-process deployments.
463
469
//
464
470
// args.TenantName must be specified. If a tenant with that name already
@@ -473,7 +479,7 @@ type TenantControlInterface interface {
473
479
ctx context.Context , args base.TestSharedProcessTenantArgs ,
474
480
) (ApplicationLayerInterface , * gosql.DB , error )
475
481
476
- // StartTenant starts the service for a secondary tenant using the special
482
+ // StartTenant starts the service for a virtual cluster using the special
477
483
// configuration we define for separate-process deployments. This incidentally
478
484
// is also the configuration we use in CC Serverless.
479
485
//
0 commit comments