Repository navigation
Commit c4fdf9b
server: a failed start() stops the Java server, so the process can exit (#98)
* server: a failed start() stops the Java server, so the process can exit
When a later plugin cannot bind its port, the engine's start() throws after
it has started non-daemon threads (the HTTP idempotency cleaner, the
security and session timers, any plugin already listening). The engine
leaves the cleanup to the caller, and only the Java stop() ends them. Our
stop() returned at once because _started stayed False, and __del__ skipped
it for the same reason, so the Python process could never exit: a CI job
on darwin/arm64 ran 28 minutes past its tests on 2026-10-02 and timed out.
start() now stops the Java server before raising. The regression test runs
a start with the Postgres port taken in a subprocess and fails on the old
wrapper (120 s timeout); the wire-protocol fixture now chooses its four
ports with every socket held, so the OS cannot hand one port out twice.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lj5isEaoaGCeaZe5nNoWX4
* test: force the failed server start with an out-of-range port, not a busy one
On macOS the engine's listener binds a port another socket already holds, so
the start succeeded, the snippet never stopped the server, and the test timed
out on every darwin/arm64 job of PR #98. A Postgres port of 70000 fails on
every OS. The snippet also stops the server if the start ever succeeds, so the
assertion reports what happened instead of a timeout. Checked: the test still
fails on the old wrapper (120 s timeout) and passes with the fix in 2 s.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lj5isEaoaGCeaZe5nNoWX4
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>1 parent 0339d72 commit c4fdf9b
3 files changed
Lines changed: 77 additions & 1 deletion
File tree
- bindings/python
- src/arcadedb_embedded
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
128 | 139 | | |
129 | 140 | | |
130 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
43 | 60 | | |
44 | 61 | | |
45 | 62 | | |
| |||
57 | 74 | | |
58 | 75 | | |
59 | 76 | | |
60 | | - | |
| 77 | + | |
61 | 78 | | |
62 | 79 | | |
63 | 80 | | |
| |||
0 commit comments