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 846a95f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 19 deletions.
34 changes: 20 additions & 14 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 Expand Up @@ -65,13 +72,13 @@ acknowledgmentAtBatchIndexLevelEnabled=true
# How often to check for inactive topics
brokerDeleteInactiveTopicsFrequencySeconds=60

# How frequently to proactively check and purge expired messages
# How frequently to proactively check and purge expired messages
messageExpiryCheckIntervalInMinutes=5

# Enable check for minimum allowed client library version
clientLibraryVersionCheckEnabled=false

# Allow client libraries with no version information
# Allow client libraries with no version information
clientLibraryVersionCheckAllowUnversioned=true

# Path for the file used to determine the rotation status for the broker when responding
Expand Down Expand Up @@ -138,7 +145,7 @@ bookkeeperClientAuthenticationPlugin=
bookkeeperClientAuthenticationParametersName=
bookkeeperClientAuthenticationParameters=

# Timeout for BK add / read operations
# Timeout for BK add / read operations
bookkeeperClientTimeoutInSeconds=30

# Speculative reads are initiated if a read request doesn't complete within a certain time
Expand All @@ -154,7 +161,7 @@ bookkeeperClientHealthCheckErrorThresholdPerInterval=5
bookkeeperClientHealthCheckQuarantineTimeInSeconds=1800

# Enable rack-aware bookie selection policy. BK will chose bookies from different racks when
# forming a new bookie ensemble
# forming a new bookie ensemble
bookkeeperClientRackawarePolicyEnabled=true

# Enable region-aware bookie selection policy. BK will chose bookies from
Expand All @@ -165,8 +172,8 @@ bookkeeperClientRegionawarePolicyEnabled=false
# Enable/disable reordering read sequence on reading entries.
bookkeeperClientReorderReadSequenceEnabled=false

# Enable bookie isolation by specifying a list of bookie groups to choose from. Any bookie
# outside the specified groups will not be used by the broker
# Enable bookie isolation by specifying a list of bookie groups to choose from. Any bookie
# outside the specified groups will not be used by the broker
bookkeeperClientIsolationGroups=

### --- Managed Ledger --- ###
Expand All @@ -182,7 +189,7 @@ managedLedgerDefaultAckQuorum=1

# Amount of memory to use for caching data payload in managed ledger. This memory
# is allocated from JVM direct memory and it's shared across all the topics
# running in the same broker
# running in the same broker
managedLedgerCacheSizeMB=1024

# Threshold to which bring down the cache level when eviction is triggered
Expand All @@ -194,7 +201,7 @@ managedLedgerDefaultMarkDeleteRateLimit=0.1
# Max number of entries to append to a ledger before triggering a rollover
# A ledger rollover is triggered on these conditions
# * Either the max rollover time has been reached
# * or max entries have been written to the ledged and at least min-time
# * or max entries have been written to the ledged and at least min-time
# has passed
managedLedgerMaxEntriesPerLedger=50000

Expand All @@ -212,7 +219,7 @@ managedLedgerCursorRolloverTimeInSeconds=14400



### --- Load balancer --- ###
### --- Load balancer --- ###

# Enable load balancer
loadBalancerEnabled=false
Expand All @@ -230,13 +237,13 @@ loadBalancerReportUpdateMaxIntervalMinutes=15
loadBalancerHostUsageCheckIntervalMinutes=1

# Load shedding interval. Broker periodically checks whether some traffic should be offload from
# some over-loaded broker to other under-loaded brokers
# some over-loaded broker to other under-loaded brokers
loadBalancerSheddingIntervalMinutes=30

# Prevent the same topics to be shed and moved to other broker more that once within this timeframe
# Prevent the same topics to be shed and moved to other broker more that once within this timeframe
loadBalancerSheddingGracePeriodMinutes=30

# Usage threshold to determine a broker as under-loaded
# Usage threshold to determine a broker as under-loaded
loadBalancerBrokerUnderloadedThresholdPercentage=1

# Usage threshold to determine a broker as over-loaded
Expand Down Expand Up @@ -276,7 +283,7 @@ replicationMetricsEnabled=true

# Max number of connections to open for each broker in a remote cluster
# More connections host-to-host lead to better throughput over high-latency
# links.
# links.
replicationConnectionsPerBroker=16

# Replicator producer queue size
Expand All @@ -298,4 +305,3 @@ brokerServicePurgeInactiveFrequencyInSeconds=60

# The maximum netty frame size in bytes. Any message received larger than this will be rejected. The default value is 5MB.
nettyMaxFrameSizeBytes=5253120

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 846a95f

Please sign in to comment.