MCPcopy Create free account
hub / github.com/PostHog/duckgres / TestResolveEffectiveConfigInvalidThreadsEnv

Function TestResolveEffectiveConfigInvalidThreadsEnv

main_test.go:443–467  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

441 warns = append(warns, msg)
442 })
443
444 // Invalid format should be cleared (falls back to auto-detection)
445 if resolved.Server.MemoryLimit != "" {
446 t.Fatalf("expected empty memory_limit after invalid input, got %q", resolved.Server.MemoryLimit)
447 }
448
449 found := false
450 for _, w := range warns {
451 if strings.Contains(w, "Invalid memory_limit format") {
452 found = true
453 break
454 }
455 }
456 if !found {
457 t.Fatalf("expected warning about invalid memory_limit format, warnings: %v", warns)
458 }
459}
460
461func TestResolveEffectiveConfigMemoryBudgetAndWorkers(t *testing.T) {
462 retireTrue := true
463 // YAML only
464 fileCfg := &FileConfig{
465 MemoryBudget: "24GB",
466 Process: ProcessFileConfig{
467 MinWorkers: 2,
468 MaxWorkers: 10,
469 RetireOnSessionEnd: &retireTrue,
470 },

Callers

nothing calls this directly

Calls 2

ResolveEffectiveFunction · 0.92
envFromMapFunction · 0.85

Tested by

no test coverage detected