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

Function IsPostgresRunning

tests/integration/harness.go:701–708  ·  view source on GitHub ↗

IsPostgresRunning checks if the PostgreSQL container is running

(port int)

Source from the content-addressed store, hash-verified

699
700// IsPostgresRunning checks if the PostgreSQL container is running
701func IsPostgresRunning(port int) bool {
702 conn, err := net.DialTimeout("tcp", fmt.Sprintf("127.0.0.1:%d", port), time.Second)
703 if err != nil {
704 return false
705 }
706 _ = conn.Close()
707 return true
708}
709
710// IsDuckLakeInfraRunning checks if the DuckLake infrastructure (metadata postgres + minio) is running
711func IsDuckLakeInfraRunning(metadataPort, minioPort int) bool {

Callers 1

TestMainFunction · 0.85

Calls 1

CloseMethod · 0.65

Tested by 1

TestMainFunction · 0.68