This commit is contained in:
2026-03-06 08:36:51 +07:00
parent aa7cdbd36f
commit 7205cc1ea3
10 changed files with 255 additions and 30 deletions

View File

@@ -4,6 +4,7 @@
*/
const NATSBridge = require('../src/natsbridge.js');
const crypto = require('crypto');
const TEST_BROKER_URL = process.env.NATS_URL || 'nats://localhost:4222';
const TEST_FILESERVER_URL = process.env.FILESERVER_URL || 'http://localhost:8080';
@@ -42,15 +43,15 @@ async function runTest() {
const arrowBuffer = Buffer.from(combined);
const testData = {
correlation_id: 'js-table-receiver-' + Date.now(),
msg_id: 'msg-' + Date.now(),
correlation_id: 'js-table-receiver-' + crypto.randomUUID(),
msg_id: 'msg-' + crypto.randomUUID(),
timestamp: new Date().toISOString(),
send_to: '/test/table',
msg_purpose: 'test',
sender_name: 'js-table-test',
sender_id: 'sender-' + Date.now(),
sender_id: 'sender-' + crypto.randomUUID(),
receiver_name: 'js-receiver',
receiver_id: 'receiver-' + Date.now(),
receiver_id: 'receiver-' + crypto.randomUUID(),
reply_to: '',
reply_to_msg_id: '',
broker_url: TEST_BROKER_URL,