Skip to content

Commit bc835df

Browse files
committed
Add listener to test conf, e2e test
1 parent 87fc65c commit bc835df

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

tests/conf/standalone.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ bindAddress=0.0.0.0
3838
# Hostname or IP address the service advertises to the outside world. If not set, the value of InetAddress.getLocalHost().getHostName() is used.
3939
advertisedAddress=localhost
4040

41+
# Used to specify multiple advertised listeners for the broker.
42+
# The value must format as <listener_name>:pulsar://<host>:<port>,
43+
# multiple listeners should separate with commas.
44+
# Do not use this configuration with advertisedAddress and brokerServicePort.
45+
# The Default value is absent means use advertisedAddress and brokerServicePort.
46+
advertisedListeners=localhost6650:pulsar://localhost:6650,localhost6651:pulsar+ssl://localhost:6651,localhost8443:pulsar+ssl://localhost:8443
47+
4148
# Name of the cluster to which this broker belongs to
4249
clusterName=standalone
4350

tests/end_to_end.test.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,16 @@ const Pulsar = require('../index');
2323
(() => {
2424
describe('End To End', () => {
2525
test.each([
26-
['pulsar://localhost:6650'],
27-
['pulsar+ssl://localhost:6651'],
28-
['http://localhost:8080'],
29-
['https://localhost:8443'],
30-
])('Produce/Consume to %s', async (serviceUrl) => {
26+
{ serviceUrl: 'pulsar://localhost:6650', listenerName: undefined },
27+
{ serviceUrl: 'pulsar+ssl://localhost:6651', listenerName: 'localhost6651' },
28+
{ serviceUrl: 'http://localhost:8080', listenerName: undefined },
29+
{ serviceUrl: 'https://localhost:8443', listenerName: 'localhost8443' },
30+
])('Produce/Consume to $serviceUrl', async ({ serviceUrl, listenerName }) => {
3131
const client = new Pulsar.Client({
3232
serviceUrl,
3333
tlsTrustCertsFilePath: `${__dirname}/certificate/server.crt`,
3434
operationTimeoutSeconds: 30,
35+
listenerName,
3536
});
3637

3738
const topic = 'persistent://public/default/produce-consume';

0 commit comments

Comments
 (0)