Skip to content

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

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

feat(js): add TCP/TLS integration tests and examples#2822
atharvalade wants to merge 6 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 38.02817% with 88 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.30%. Comparing base (ecd7709) to head (4bc0f69).

Files with missing lines Patch % Lines
foreign/node/src/e2e/tls.system.e2e.ts 38.02% 88 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2822      +/-   ##
============================================
- Coverage     68.36%   68.30%   -0.07%     
  Complexity      739      739              
============================================
  Files          1053     1054       +1     
  Lines         84763    84905     +142     
  Branches      61297    61307      +10     
============================================
+ Hits          57948    57991      +43     
- Misses        24448    24532      +84     
- Partials       2367     2382      +15     
Flag Coverage Δ
csharp 67.45% <ø> (-0.17%) ⬇️
go 6.27% <ø> (ø)
java 54.83% <ø> (ø)
node 91.48% <38.02%> (-0.93%) ⬇️
python 81.57% <ø> (ø)
rust 70.05% <ø> (-0.01%) ⬇️

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 38.02% <38.02%> (ø)

... and 13 files with indirect coverage changes

🚀 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
Copy link
Contributor

@T1B0 T1B0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some file(s) ( "../init" ?) missing from PR, i can't assert it transpile or work as it is

Copy link
Member

@mmodzelewski mmodzelewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The examples should be added to test-examples.sh/README.md

@atharvalade
Copy link
Contributor Author

The examples should be added to test-examples.sh/README.md

added

Copy link
Contributor

@T1B0 T1B0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all fixed ! LGTM 🚀

@atharvalade atharvalade requested a review from mmodzelewski March 7, 2026 20:58
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

3 participants