Commit 9e8ff44
committed
fix: ensure embedded-postgres state is wiped between retries
Retries were previously added when starting embedded postgres to mitigate port
allocation conflicts (we can't use an ephemeral port). Retries alone seemingly
did not fix the test flakes. A new failure mode appeared on the retries: timing
out connecting to the database.
When a port discovery error occurrs, embedded-postgres does not create the
database. If the data directory exists on the next attempt, embedded-postgres
will assume the database has already been created. This seems to cause the
timeout error. Wipe all state between retries to ensure attempts execute the
same logic that creates the database.1 parent a272843 commit 9e8ff44
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2158 | 2158 | | |
2159 | 2159 | | |
2160 | 2160 | | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
2161 | 2169 | | |
2162 | 2170 | | |
2163 | 2171 | | |
| |||
2204 | 2212 | | |
2205 | 2213 | | |
2206 | 2214 | | |
2207 | | - | |
2208 | | - | |
2209 | | - | |
2210 | | - | |
2211 | | - | |
2212 | 2215 | | |
2213 | 2216 | | |
2214 | 2217 | | |
| |||
0 commit comments