You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ba...@apache.org on 2023/05/12 02:26:59 UTC
[pulsar-client-node] branch master updated: Upgrade unit test depends on the pulsar version to the latest(currently 3.0.0) (#324)
This is an automated email from the ASF dual-hosted git repository.
baodi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-node.git
The following commit(s) were added to refs/heads/master by this push:
new 6d89db4 Upgrade unit test depends on the pulsar version to the latest(currently 3.0.0) (#324)
6d89db4 is described below
commit 6d89db4b66d05caf52624c125e8da61b094449dd
Author: Baodi Shi <ba...@apache.org>
AuthorDate: Fri May 12 10:26:53 2023 +0800
Upgrade unit test depends on the pulsar version to the latest(currently 3.0.0) (#324)
* Upgrade unit test depend pulsar version to latest(3.0.0).
* Fix unit test.
---
build-support/pulsar-test-service-start.sh | 2 +-
tests/consumer.test.js | 4 ++--
tests/producer.test.js | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/build-support/pulsar-test-service-start.sh b/build-support/pulsar-test-service-start.sh
index ded136c..c1b2d43 100755
--- a/build-support/pulsar-test-service-start.sh
+++ b/build-support/pulsar-test-service-start.sh
@@ -25,7 +25,7 @@ cd $SRC_DIR
build-support/pulsar-test-service-stop.sh
-CONTAINER_ID=$(docker run -i -p 8080:8080 -p 6650:6650 -p 8443:8443 -p 6651:6651 --rm --detach apachepulsar/pulsar:2.10.2 sleep 3600)
+CONTAINER_ID=$(docker run -i -p 8080:8080 -p 6650:6650 -p 8443:8443 -p 6651:6651 --rm --detach apachepulsar/pulsar:latest sleep 3600)
echo $CONTAINER_ID >.tests-container-id.txt
diff --git a/tests/consumer.test.js b/tests/consumer.test.js
index b13fac2..e41c638 100644
--- a/tests/consumer.test.js
+++ b/tests/consumer.test.js
@@ -102,7 +102,7 @@ const Pulsar = require('../index.js');
subscription: 'sub1',
ackTimeoutMs: 10000,
nAckRedeliverTimeoutMs: 60000,
- })).rejects.toThrow('Failed to create consumer: BrokerMetadataError');
+ })).rejects.toThrow('Failed to create consumer: TopicNotFound');
});
test('Not Exist Namespace', async () => {
@@ -111,7 +111,7 @@ const Pulsar = require('../index.js');
subscription: 'sub1',
ackTimeoutMs: 10000,
nAckRedeliverTimeoutMs: 60000,
- })).rejects.toThrow('Failed to create consumer: BrokerMetadataError');
+ })).rejects.toThrow('Failed to create consumer: TopicNotFound');
});
test('Not Positive NAckRedeliverTimeout', async () => {
diff --git a/tests/producer.test.js b/tests/producer.test.js
index 40712a5..fa7710b 100644
--- a/tests/producer.test.js
+++ b/tests/producer.test.js
@@ -55,7 +55,7 @@ const Pulsar = require('../index.js');
topic: 'persistent://no-tenant/namespace/topic',
sendTimeoutMs: 30000,
batchingEnabled: true,
- })).rejects.toThrow('Failed to create producer: BrokerMetadataError');
+ })).rejects.toThrow('Failed to create producer: TopicNotFound');
});
test('Not Exist Namespace', async () => {
@@ -63,7 +63,7 @@ const Pulsar = require('../index.js');
topic: 'persistent://public/no-namespace/topic',
sendTimeoutMs: 30000,
batchingEnabled: true,
- })).rejects.toThrow('Failed to create producer: BrokerMetadataError');
+ })).rejects.toThrow('Failed to create producer: TopicNotFound');
});
test('Automatic Producer Name', async () => {