Skip to content

[DX-4370] Convert FullTestDB to pgtestdb#22754

Open
kalverra wants to merge 11 commits into
developfrom
pgtestdb
Open

[DX-4370] Convert FullTestDB to pgtestdb#22754
kalverra wants to merge 11 commits into
developfrom
pgtestdb

Conversation

@kalverra
Copy link
Copy Markdown
Collaborator

@kalverra kalverra commented Jun 5, 2026

Replaces custom PostgresDB setup for heavyweight package with pgtestdb. Results in better isolation (less flakes) with a bit smaller memory (−32.66%) and speed (−7.03%) footprint!

FullTestDB benchmark

goos: darwin
goarch: arm64
cpu: Apple M3 Max

benchstat comparing develop vs pgtestdb, 10 runs each.

Benchmark develop (time) pgtestdb (time) Δ time develop (mem) pgtestdb (mem) Δ mem develop (allocs) pgtestdb (allocs) Δ allocs
FullTestDBNoFixturesV2 37.55 ms ± 3% 34.63 ms ± 2% −7.77% (p=0.001) 575.7 KiB ± 0% 387.8 KiB ± 0% −32.64% (p=0.000) 3,585 ± 0% 2,304 ± 0% −35.73% (p=0.000)
FullTestDBEmptyV2 24.42 ms ± 3% 22.88 ms ± 1% −6.29% (p=0.000) 574.8 KiB ± 0% 387.0 KiB ± 0% −32.67% (p=0.000) 3,582 ± 0% 2,304 ± 0% −35.68% (p=0.000)
geomean 30.28 ms 28.15 ms −7.03% 575.2 KiB 387.4 KiB −32.66% 3,583 2,304 −35.71%

./core/... test results

❯ make test ARGS="diagnose --iterations 10 -- ./core/..."
Setup Postgres ✅ (6.807s)
 Iter  Result       Tests   Skipped  Failures  Timeouts      Slow     Runtime
─────────────────────────────────────────────────────────────────────────────
    1  pass          8572       106         0         0        31       4m29s
    2  pass          8572       106         0         0        26       4m19s
    3  pass          8572       106         0         0        23       4m19s
    4  pass          8572       106         0         0        23       3m55s
    5  pass          8572       106         0         0        23        4m2s
    6  pass          8572       106         0         0        23       4m10s
    7  pass          8572       106         0         0        23       4m11s
    8  pass          8572       106         0         0        23       3m54s
    9  pass          8572       106         0         0        24       4m10s
   10  pass          8572       106         0         0        23        4m6s

Diagnosis Complete! [42m32.60s]
  8678 tests · 10 iters · slow ≥ 30s · wall min 3m54.04s  p50 4m9.831s  max 4m28.768s
  ╭──────────────────┬───────┬───────────────────────╮
  │                  │ Count │ Rate                  │
  ├──────────────────┼───────┼───────────────────────┤
  │ Broken Tests     │ 0     │   0.0%                │
  │ Flaky Tests      │ 0     │   0.0%                │
  │ Slow Tests       │ 35    │   0.4%                │
  │ Flaky Iterations │ 0/10  │   0.0%  CI 0.0%–27.8% │
  ╰──────────────────┴───────┴───────────────────────╯

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

👋 kalverra, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

✅ No conflicts with other open PRs targeting develop

@cl-sonarqube-production
Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarQube IDE SonarQube IDE

@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented Jun 6, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant