(t *testing.T)
| 278 | tests := []struct { |
| 279 | name string |
| 280 | cfg DuckLakeConfig |
| 281 | want []string |
| 282 | }{ |
| 283 | { |
| 284 | name: "default disables metadata tls cache", |
| 285 | cfg: DuckLakeConfig{}, |
| 286 | want: []string{"SET GLOBAL pg_pool_enable_thread_local_cache = false"}, |
| 287 | }, |
| 288 | { |
| 289 | name: "disable metadata tls cache", |
| 290 | cfg: DuckLakeConfig{ |
| 291 | DisableMetadataThreadLocalCache: boolPtr(true), |
| 292 | }, |
| 293 | want: []string{"SET GLOBAL pg_pool_enable_thread_local_cache = false"}, |
| 294 | }, |
| 295 | { |
| 296 | name: "explicitly keep metadata tls cache enabled", |
| 297 | cfg: DuckLakeConfig{ |
| 298 | DisableMetadataThreadLocalCache: boolPtr(false), |
| 299 | }, |
| 300 | want: nil, |
| 301 | }, |
| 302 | { |
| 303 | name: "via pgbouncer disables in-process pool", |
| 304 | cfg: DuckLakeConfig{ |
| 305 | DisableMetadataThreadLocalCache: boolPtr(false), |
| 306 | ViaPgBouncer: true, |
| 307 | }, |
| 308 | want: []string{"SET GLOBAL pg_pool_max_connections = 0"}, |
| 309 | }, |
| 310 | { |
| 311 | name: "via pgbouncer with tls cache disabled emits both", |
| 312 | cfg: DuckLakeConfig{ |
| 313 | ViaPgBouncer: true, |
nothing calls this directly
no test coverage detected