Commit a02ad86
committed
fix(test): remove unnecessary app.Before() calls that overwrite test DB config
TestShell_BeforeNode and TestShell_RunNode_WithBeforeNode called
app.Before(c) before BeforeNode(c). The Before hook unconditionally
creates a fresh config with the default pgx driver, overwriting the
test's txdb-wrapped config. This caused BeforeNode to open real DB
connections that leaked state between tests, exhausting the
connection pool.
BeforeNode only needs Config and Logger — both already set by the
test. The app.Before() call was unnecessary. Other tests in the same
file (lines 258, 342, 420) correctly call BeforeNode directly
without app.Before().
Fixes: CORE-23881 parent d62edd5 commit a02ad86
1 file changed
+2
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
| 546 | + | |
555 | 547 | | |
556 | 548 | | |
557 | 549 | | |
| |||
641 | 633 | | |
642 | 634 | | |
643 | 635 | | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
| 636 | + | |
650 | 637 | | |
651 | 638 | | |
652 | 639 | | |
| |||
0 commit comments