Skip to content

Commit

Permalink
Add listener to test conf, e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
roryschadler committed Apr 4, 2024
1 parent 87fc65c commit bc835df
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
7 changes: 7 additions & 0 deletions tests/conf/standalone.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ bindAddress=0.0.0.0
# Hostname or IP address the service advertises to the outside world. If not set, the value of InetAddress.getLocalHost().getHostName() is used.
advertisedAddress=localhost

# Used to specify multiple advertised listeners for the broker.
# The value must format as <listener_name>:pulsar://<host>:<port>,
# multiple listeners should separate with commas.
# Do not use this configuration with advertisedAddress and brokerServicePort.
# The Default value is absent means use advertisedAddress and brokerServicePort.
advertisedListeners=localhost6650:pulsar://localhost:6650,localhost6651:pulsar+ssl://localhost:6651,localhost8443:pulsar+ssl://localhost:8443

# Name of the cluster to which this broker belongs to
clusterName=standalone

Expand Down
11 changes: 6 additions & 5 deletions tests/end_to_end.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ const Pulsar = require('../index');
(() => {
describe('End To End', () => {
test.each([
['pulsar://localhost:6650'],
['pulsar+ssl://localhost:6651'],
['http://localhost:8080'],
['https://localhost:8443'],
])('Produce/Consume to %s', async (serviceUrl) => {
{ serviceUrl: 'pulsar://localhost:6650', listenerName: undefined },
{ serviceUrl: 'pulsar+ssl://localhost:6651', listenerName: 'localhost6651' },
{ serviceUrl: 'http://localhost:8080', listenerName: undefined },
{ serviceUrl: 'https://localhost:8443', listenerName: 'localhost8443' },
])('Produce/Consume to $serviceUrl', async ({ serviceUrl, listenerName }) => {
const client = new Pulsar.Client({
serviceUrl,
tlsTrustCertsFilePath: `${__dirname}/certificate/server.crt`,
operationTimeoutSeconds: 30,
listenerName,
});

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

0 comments on commit bc835df

Please sign in to comment.