• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

node-opcua / node-opcua-pki / 30446845856
90%

Build:
DEFAULT BRANCH: master
Ran 29 Jul 2026 11:16AM UTC
Jobs 1
Files 21
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Jul 2026 11:15AM UTC coverage: 90.386%. Remained the same
30446845856

push

github

erossignon
test: fail loudly when the suite leaks the event loop

The hang fixed in the previous commit was green: 250 passing, then a silent
300s wait and a stuck CI job. Nothing in the suite reported a problem. This
adds a mocha global teardown so that state fails fast with a named cause
instead of looking like an infrastructure stall.

Verified both directions:

  - a test that arms an uncleared timer now exits 1 after 16s with
    "LEAKED RESOURCES ... 1x Timeout" instead of hanging for 300s
  - the real suite still exits 0, 250 passing, no false positive

Three things had to be right, each of which failed on the first attempt and
is worth not rediscovering:

  1. getActiveResourcesInfo(), not _getActiveHandles(). The latter does not
     report timers at all - they live in a separate internal list - so it
     returns zero active handles while the process is plainly stuck. That is
     what made the original investigation discard the timer theory and chase
     file watchers instead.

  2. Print and process.exit(1); do not throw. mocha invokes
     mochaGlobalTeardown but swallows whatever it throws once the run has
     completed - the message never appears and the process hangs anyway.
     Forcing the exit is also what makes CI fail in seconds instead of
     sitting until the job timeout.

  3. Wait for drain rather than sampling once. A clean run legitimately has
     ~10 short-lived timers still in flight immediately after the last test
     (polling helpers, chokidar internals); sampling once reported all ten as
     leaks. What distinguishes a real leak is that it never drains, so the
     hook polls for up to 15s and only reports if the deadline passes. Clean
     runs return as soon as the loop empties and pay nothing.

The watched resource kinds are an allow-list (Timeout, FSEvent, StatWatcher,
ChildProcess, sockets), not a deny-list of benign ones: stdio alone appears
as PipeWrap, TTYWrap or FileHandle depending on whether output is a terminal
o... (continued)

496 of 667 branches covered (74.36%)

1476 of 1633 relevant lines covered (90.39%)

248.63 hits per line

Coverage Regressions

Lines Coverage ∆ File
28
92.94
0.0% packages/node-opcua-pki/lib/ca/certificate_authority.ts
11
84.62
0.0% packages/node-opcua-pki/lib/toolbox/with_openssl/execute_openssl.ts
5
91.38
0.0% packages/node-opcua-pki/lib/toolbox/with_openssl/toolbox.ts
1
88.89
0.0% packages/node-opcua-pki/lib/toolbox/debug.ts
Jobs
ID Job ID Ran Files Coverage
1 30446845856.1 29 Jul 2026 11:16AM UTC 21
90.39
GitHub Action Run
Source Files on build 30446845856
  • Tree
  • List 21
  • Changed 5
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30446845856
  • 637066c7 on github
  • Prev Build on master (#29082833587)
  • Next Build on master (#30447524885)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc