Commit 844454c
committed
test: make assertMemoryLeak assert strict per-tag equality -- single-tag leaks passed
LeakCheck.close() absorbed any growth confined to a single memory tag
into a tolerated diff (mem + diff == memAfter holds when exactly one
tag grew), so a lone-tag native leak -- the common case -- passed the
check. The shape was ported from upstream QuestDB, where the tolerance
is scoped to NATIVE_SQL_COMPILER only; the per-tag filter was lost in
the port and this client has no such tag, so no exemption applies.
Proven vacuous empirically: disabling the M7 stub close under the old
check stayed green; under the strict check all 18 tests fail with
'native memory leaked or over-freed under tag NATIVE_DEFAULT
expected:<0> but was:<131328>' (exactly recv 64K + send 64K + control
256B per stub).
Tightening surfaced 63 latent failures across 6 classes -- all
root-caused and fixed in the two preceding commits (two production
ctor leaks, two test free-ordering bugs, one test cleanup gap); none
suppressed. MemoryTag.nameOf() added (mirrors upstream) so failures
name the offending tag.1 parent 2cb81d0 commit 844454c
2 files changed
Lines changed: 40 additions & 10 deletions
File tree
- core/src
- main/java/io/questdb/client/std
- test/java/io/questdb/client/test/tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
41 | 68 | | |
Lines changed: 13 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
270 | 275 | | |
271 | | - | |
272 | 276 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
280 | 283 | | |
281 | | - | |
282 | 284 | | |
| 285 | + | |
283 | 286 | | |
284 | 287 | | |
285 | 288 | | |
| |||
0 commit comments