Skip to content

feat(js): add TCP/TLS integration tests and examples#2822

Open
atharvalade wants to merge 2 commits intoapache:masterfrom
atharvalade:node-tcp-tls-tests-examples
Open

feat(js): add TCP/TLS integration tests and examples#2822
atharvalade wants to merge 2 commits intoapache:masterfrom
atharvalade:node-tcp-tls-tests-examples

Conversation

@atharvalade
Copy link
Contributor

Which issue does this PR close?

Closes #2808

Rationale

No TLS integration tests or TLS examples existed for the Node.js SDK despite full TLS transport support.

What changed?

The Node.js SDK had TLS transport implemented via createTlsSocket() but no tests exercising it and no examples showing usage.

Added TLS e2e tests in foreign/node/src/e2e/tls.system.e2e.ts covering ping, login, stats, send/poll messages over TLS, and plain TCP failure when TLS is required. Added tcp-tls/producer.ts and tcp-tls/consumer.ts examples using transport: 'TLS' with custom CA certificate from core/certs/.

Local Execution

Passed. eslint clean on both examples/node and foreign/node.

AI Usage

  1. Opus 4.6
  2. guided by existing getting-started examples and tcp.system.e2e.ts test patterns
  3. Compiled and linted locally, verified code follows existing patterns exactly
  4. Yes

@atharvalade
Copy link
Contributor Author

atharvalade commented Feb 26, 2026

Resolved

@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 102 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.37%. Comparing base (514b5c5) to head (f850eef).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
foreign/node/src/e2e/tls.system.e2e.ts 33.33% 102 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2822      +/-   ##
============================================
- Coverage     71.44%   71.37%   -0.08%     
  Complexity      708      708              
============================================
  Files           969      970       +1     
  Lines         78219    78372     +153     
  Branches      60029    60029              
============================================
+ Hits          55884    55935      +51     
- Misses        20002    20104     +102     
  Partials       2333     2333              
Flag Coverage Δ
node 91.35% <33.33%> (-1.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
foreign/node/src/e2e/tls.system.e2e.ts 33.33% <33.33%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

TLS e2e tests for ping, login, message flow, and plain TCP failure scenario
@atharvalade atharvalade force-pushed the node-tcp-tls-tests-examples branch from fd8dfee to 95f2cb0 Compare February 26, 2026 17:37
@atharvalade atharvalade changed the title Add TCP/TLS integration tests and examples for Node.js SDK feat(node): add TCP/TLS integration tests and examples Feb 26, 2026
@atharvalade atharvalade changed the title feat(node): add TCP/TLS integration tests and examples feat(js): add TCP/TLS integration tests and examples Feb 26, 2026
@atharvalade atharvalade force-pushed the node-tcp-tls-tests-examples branch from 0ba93fc to f850eef Compare February 26, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Node.js SDK: Add TCP/TLS integration tests and examples

1 participant