perf: batch gateway submits and isolate callbacks
This commit is contained in:
@@ -85,6 +85,17 @@ func TestNormalizeUpstreamConfigDefaults(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestManagerSeparatesConnectionStateAndSupplierEventAPIs(t *testing.T) {
|
||||
manager := &Manager{APIBaseURL: "http://main-api/api", EventAPIBaseURL: "http://callback-api/api"}
|
||||
pool := manager.newConnectionPool("channel-1", "channel-1:primary", queue.UpstreamConfig{DesiredConnections: 1})
|
||||
if pool.apiBaseURL != manager.EventAPIBaseURL {
|
||||
t.Fatalf("supplier events must use callback API, got %q", pool.apiBaseURL)
|
||||
}
|
||||
if manager.APIBaseURL == pool.apiBaseURL {
|
||||
t.Fatal("connection-state control API must remain separate from supplier events")
|
||||
}
|
||||
}
|
||||
|
||||
func queueUpstreamConfigForTest() queue.UpstreamConfig {
|
||||
return queue.UpstreamConfig{
|
||||
GatewayHost: "127.0.0.1",
|
||||
|
||||
Reference in New Issue
Block a user